#include "dtd.h"
#include <wsutil/file_util.h>
+/*
+ * Disable diagnostics in the code generated by Flex.
+ */
+DIAG_OFF_FLEX
+
#define ECHO g_string_append(yyextra->current,yytext);
struct _dtd_preparse_scanner_state {
#define YY_NO_UNISTD_H
#endif
-#ifdef _WIN32
-/* disable Windows VC compiler warning "signed/unsigned mismatch" associated */
-/* with YY_INPUT code generated by flex versions such as 2.5.35. */
-#pragma warning (disable:4018)
-#endif
-
/*
* Sleazy hack to suppress compiler warnings in yy_fatal_error().
*/
%%
+/*
+ * Turn diagnostics back on, so we check the code that we've written.
+ */
+DIAG_ON_FLEX
+
static const gchar* replace_entity(Dtd_PreParse_scanner_state_t* state, gchar* entity) {
GString* replacement;
const gchar* dtd_location(Dtd_PreParse_scanner_state_t* state) {
static gchar* loc = NULL;
- if (loc) g_free(loc);
+ g_free(loc);
if (!state) return NULL;