summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/main.c b/main.c
index b177663b..72fe0dcc 100644
--- a/main.c
+++ b/main.c
@@ -117,8 +117,9 @@ SRCFILE *srcfiles; /* source files */
/*
* structure to remember variable pre-assignments
*/
+enum assign_type { PRE_ASSIGN = 1, PRE_ASSIGN_FS } type;
struct pre_assign {
- enum assign_type { PRE_ASSIGN = 1, PRE_ASSIGN_FS } type;
+ enum assign_type type;
char *val;
};
@@ -134,7 +135,7 @@ static void set_locale_stuff(void);
static bool stopped_early = false;
bool using_persistent_malloc = false;
-enum do_flag_values do_flags = DO_FLAG_NONE;
+int do_flags = DO_FLAG_NONE;
bool do_itrace = false; /* provide simple instruction trace */
bool do_optimize = true; /* apply default optimizations */
static int do_nostalgia = false; /* provide a blast from the past */
@@ -1769,7 +1770,7 @@ parse_args(int argc, char **argv)
case 'T': // --persist[=file]
#ifdef USE_PERSISTENT_MALLOC
if (optarg == NULL)
- optarg = "/some/file";
+ optarg = (char *) "/some/file";
fatal(_("Use `GAWK_PERSIST_FILE=%s gawk ...' instead of --persist."), optarg);
#else
warning(_("Persistent memory is not supported."));
@@ -1943,7 +1944,7 @@ check_pma_security(const char *pma_file)
} else if (euid == 0) {
fprintf(stderr, _("%s: fatal: using persistent memory is not allowed when running as root.\n"), myname);
exit(EXIT_FATAL);
- } else if (sbuf.st_uid != euid) {
+ } else if (sbuf.st_uid != (uid_t) euid) {
fprintf(stderr, _("%s: warning: %s is not owned by euid %d.\n"),
myname, pma_file, euid);
}