From c03cd23f455776f4fdf68966f6ac01e99f054d1e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Mar 2011 22:36:36 -0700 Subject: [PATCH] * emacs.c (main): Add casts to avoid warnings if GCC considers string literals to be constants. --- src/ChangeLog | 2 ++ src/emacs.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 76da9676289..3acc86015b4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,8 @@ (DEFINE_DUMMY_FUNCTION): New macro. (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main): Use it. + (main): Add casts to avoid warnings + if GCC considers string literals to be constants. * lisp.h (fatal_error_signal): Add decl, since it's exported. diff --git a/src/emacs.c b/src/emacs.c index 54e59a3f3c8..c49e38f7a67 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -949,7 +949,7 @@ main (int argc, char **argv) /* Convert --script to -scriptload, un-skip it, and sort again so that it will be handled in proper sequence. */ /* FIXME broken for --script=FILE - is that supposed to work? */ - argv[skip_args - 1] = "-scriptload"; + argv[skip_args - 1] = (char *) "-scriptload"; skip_args -= 2; sort_args (argc, argv); } @@ -1348,7 +1348,7 @@ main (int argc, char **argv) for (j = 0; j < count_before + 1; j++) new[j] = argv[j]; - new[count_before + 1] = "-d"; + new[count_before + 1] = (char *) "-d"; new[count_before + 2] = displayname; for (j = count_before + 2; j count_before && argv[count_before + 1][1] == '-') - argv[count_before + 1] = "-d"; + argv[count_before + 1] = (char *) "-d"; if (! no_site_lisp) { -- 2.39.5