From: Paul Eggert Date: Mon, 14 Mar 2011 05:36:36 +0000 (-0700) Subject: * emacs.c (main): Add casts to avoid warnings X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~554^2~118 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c03cd23f455776f4fdf68966f6ac01e99f054d1e;p=emacs.git * emacs.c (main): Add casts to avoid warnings if GCC considers string literals to be constants. --- 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) {