diff options
| author | Paul Eggert | 2011-03-13 22:36:36 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-03-13 22:36:36 -0700 |
| commit | c03cd23f455776f4fdf68966f6ac01e99f054d1e (patch) | |
| tree | 45fbbbb74af200812006ebc83d3d3e5b7db1908e /src | |
| parent | 244fc23d16bd60d159ee359a2f9eadff8b9fe8d3 (diff) | |
| download | emacs-c03cd23f455776f4fdf68966f6ac01e99f054d1e.tar.gz emacs-c03cd23f455776f4fdf68966f6ac01e99f054d1e.zip | |
* emacs.c (main): Add casts to avoid warnings
if GCC considers string literals to be constants.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | 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 @@ | |||
| 4 | (DEFINE_DUMMY_FUNCTION): New macro. | 4 | (DEFINE_DUMMY_FUNCTION): New macro. |
| 5 | (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main): | 5 | (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main): |
| 6 | Use it. | 6 | Use it. |
| 7 | (main): Add casts to avoid warnings | ||
| 8 | if GCC considers string literals to be constants. | ||
| 7 | 9 | ||
| 8 | * lisp.h (fatal_error_signal): Add decl, since it's exported. | 10 | * lisp.h (fatal_error_signal): Add decl, since it's exported. |
| 9 | 11 | ||
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) | |||
| 949 | /* Convert --script to -scriptload, un-skip it, and sort again | 949 | /* Convert --script to -scriptload, un-skip it, and sort again |
| 950 | so that it will be handled in proper sequence. */ | 950 | so that it will be handled in proper sequence. */ |
| 951 | /* FIXME broken for --script=FILE - is that supposed to work? */ | 951 | /* FIXME broken for --script=FILE - is that supposed to work? */ |
| 952 | argv[skip_args - 1] = "-scriptload"; | 952 | argv[skip_args - 1] = (char *) "-scriptload"; |
| 953 | skip_args -= 2; | 953 | skip_args -= 2; |
| 954 | sort_args (argc, argv); | 954 | sort_args (argc, argv); |
| 955 | } | 955 | } |
| @@ -1348,7 +1348,7 @@ main (int argc, char **argv) | |||
| 1348 | 1348 | ||
| 1349 | for (j = 0; j < count_before + 1; j++) | 1349 | for (j = 0; j < count_before + 1; j++) |
| 1350 | new[j] = argv[j]; | 1350 | new[j] = argv[j]; |
| 1351 | new[count_before + 1] = "-d"; | 1351 | new[count_before + 1] = (char *) "-d"; |
| 1352 | new[count_before + 2] = displayname; | 1352 | new[count_before + 2] = displayname; |
| 1353 | for (j = count_before + 2; j <argc; j++) | 1353 | for (j = count_before + 2; j <argc; j++) |
| 1354 | new[j + 1] = argv[j]; | 1354 | new[j + 1] = argv[j]; |
| @@ -1358,7 +1358,7 @@ main (int argc, char **argv) | |||
| 1358 | /* Change --display to -d, when its arg is separate. */ | 1358 | /* Change --display to -d, when its arg is separate. */ |
| 1359 | else if (displayname != 0 && skip_args > count_before | 1359 | else if (displayname != 0 && skip_args > count_before |
| 1360 | && argv[count_before + 1][1] == '-') | 1360 | && argv[count_before + 1][1] == '-') |
| 1361 | argv[count_before + 1] = "-d"; | 1361 | argv[count_before + 1] = (char *) "-d"; |
| 1362 | 1362 | ||
| 1363 | if (! no_site_lisp) | 1363 | if (! no_site_lisp) |
| 1364 | { | 1364 | { |