diff options
| author | Juanma Barranquero | 2010-07-25 02:20:51 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2010-07-25 02:20:51 +0200 |
| commit | 361358ea12271d5d747773a2d1ba743ee9516745 (patch) | |
| tree | cee5bc68721bbe0be71359d7368439aa3df092b6 /lib-src | |
| parent | 12a251254bbeb759a7e717ce0f68038a0bd03723 (diff) | |
| download | emacs-361358ea12271d5d747773a2d1ba743ee9516745.tar.gz emacs-361358ea12271d5d747773a2d1ba743ee9516745.zip | |
Make building under stricter warning flags somewhat cleaner.
Flags used: -Wold-style-declaration -Wunused-function -Wstrict-prototypes
* lib-src/emacsclient.c (getcwd, w32_getenv):
* lib-src/ntlib.h (getlogin, getuid, getegid, getgid): Fix prototypes.
* nt/runemacs.c (set_user_model_id): Fix prototype.
* src/callproc.c (relocate_fd): Set inside #ifndef WINDOWSNT.
* src/dired.c (opendir, readdir): Fix prototypes.
* src/editfns.c (w32_get_internal_run_time): Fix prototypes.
* src/keyboard.c (input_available_signal): Declare inside #ifdef SIGIO.
* src/ndir.h (opendir, readdir, seekdir, closedir): Fix prototypes.
(telldir): Remove declaration.
* src/ralloc.c (real_morecore, __morecore): Fix prototypes.
* src/sound.c (alsa_sound_perror): Declare inside #ifdef HAVE_ALSA.
* src/syssignal.h (strsignal): Fix prototype.
* src/term.c (tparam): Fix prototype.
(term_get_fkeys_address, term_get_fkeys_kboard, term_get_fkeys_1)
(term_get_fkeys): Set inside "#ifndef DOS_NT".
* src/vm-limit.c (check_memory_limits): Fix prototypes of real_morecore
and __morecore.
* src/w32gui.h (XParseGeometry): Fix prototype.
* src/w32heap.h (get_data_start, get_data_end, init_heap): Fix prototypes.
* src/w32term.c (my_set_focus): Declare inside #if 0.
* src/w32term.h (x_window_to_frame, x_display_info_for_name, w32_term_init)
(w32_fill_rect, w32_clear_window, init_crit, delete_crit, signal_quit)
(drain_message_queue, get_next_msg, post_msg, parse_button)
(ClipboardSequence_Proc): Fix prototypes.
(wait_for_sync): Remove declaration.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 5 | ||||
| -rw-r--r-- | lib-src/emacsclient.c | 12 | ||||
| -rw-r--r-- | lib-src/ntlib.h | 12 |
3 files changed, 17 insertions, 12 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 50184ee58ad..09d139019e8 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-07-25 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * emacsclient.c (getcwd, w32_getenv): | ||
| 4 | * ntlib.h (getlogin, getuid, getegid, getgid): Fix prototypes. | ||
| 5 | |||
| 1 | 2010-07-24 Dan Nicolaescu <dann@ics.uci.edu> | 6 | 2010-07-24 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 7 | ||
| 3 | * update-game-score.c (usage): Add NO_RETURN specifier. | 8 | * update-game-score.c (usage): Add NO_RETURN specifier. |
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index cbf988348dd..39b5956741d 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -82,10 +82,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 82 | 82 | ||
| 83 | 83 | ||
| 84 | char *getenv (const char *), *getwd (char *); | 84 | char *getenv (const char *), *getwd (char *); |
| 85 | char *(getcwd) (); | 85 | char *(getcwd) (char *, int); |
| 86 | 86 | ||
| 87 | #ifdef WINDOWSNT | 87 | #ifdef WINDOWSNT |
| 88 | char *w32_getenv (); | 88 | char *w32_getenv (char *); |
| 89 | #define egetenv(VAR) w32_getenv(VAR) | 89 | #define egetenv(VAR) w32_getenv(VAR) |
| 90 | #else | 90 | #else |
| 91 | #define egetenv(VAR) getenv(VAR) | 91 | #define egetenv(VAR) getenv(VAR) |
| @@ -402,7 +402,7 @@ w32_set_user_model_id (void) | |||
| 402 | /* On Windows 7 and later, we need to set the user model ID | 402 | /* On Windows 7 and later, we need to set the user model ID |
| 403 | to associate emacsclient launched files with Emacs frames | 403 | to associate emacsclient launched files with Emacs frames |
| 404 | in the UI. */ | 404 | in the UI. */ |
| 405 | shell = LoadLibrary("shell32.dll"); | 405 | shell = LoadLibrary ("shell32.dll"); |
| 406 | if (shell) | 406 | if (shell) |
| 407 | { | 407 | { |
| 408 | set_user_model | 408 | set_user_model |
| @@ -432,7 +432,7 @@ w32_window_app (void) | |||
| 432 | nonconsole apps. Testing for the console title seems to work. */ | 432 | nonconsole apps. Testing for the console title seems to work. */ |
| 433 | window_app = (GetConsoleTitleA (szTitle, MAX_PATH) == 0); | 433 | window_app = (GetConsoleTitleA (szTitle, MAX_PATH) == 0); |
| 434 | if (window_app) | 434 | if (window_app) |
| 435 | InitCommonControls(); | 435 | InitCommonControls (); |
| 436 | } | 436 | } |
| 437 | 437 | ||
| 438 | return window_app; | 438 | return window_app; |
| @@ -483,7 +483,7 @@ ttyname (int fd) | |||
| 483 | void | 483 | void |
| 484 | message (int is_error, char *message, ...) | 484 | message (int is_error, char *message, ...) |
| 485 | { | 485 | { |
| 486 | char msg [2048]; | 486 | char msg[2048]; |
| 487 | va_list args; | 487 | va_list args; |
| 488 | 488 | ||
| 489 | va_start (args, message); | 489 | va_start (args, message); |
| @@ -1470,7 +1470,7 @@ start_daemon_and_retry_set_socket (void) | |||
| 1470 | pid_t w; | 1470 | pid_t w; |
| 1471 | w = waitpid (dpid, &status, WUNTRACED | WCONTINUED); | 1471 | w = waitpid (dpid, &status, WUNTRACED | WCONTINUED); |
| 1472 | 1472 | ||
| 1473 | if ((w == -1) || !WIFEXITED (status) || WEXITSTATUS(status)) | 1473 | if ((w == -1) || !WIFEXITED (status) || WEXITSTATUS (status)) |
| 1474 | { | 1474 | { |
| 1475 | message (TRUE, "Error: Could not start the Emacs daemon\n"); | 1475 | message (TRUE, "Error: Could not start the Emacs daemon\n"); |
| 1476 | exit (EXIT_FAILURE); | 1476 | exit (EXIT_FAILURE); |
diff --git a/lib-src/ntlib.h b/lib-src/ntlib.h index fd51269fdfd..4dd6a32ee32 100644 --- a/lib-src/ntlib.h +++ b/lib-src/ntlib.h | |||
| @@ -30,14 +30,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 30 | #ifdef sleep | 30 | #ifdef sleep |
| 31 | #undef sleep | 31 | #undef sleep |
| 32 | #endif | 32 | #endif |
| 33 | void sleep(unsigned long seconds); | 33 | void sleep (unsigned long seconds); |
| 34 | char *getwd (char *dir); | 34 | char *getwd (char *dir); |
| 35 | int getppid(void); | 35 | int getppid (void); |
| 36 | char * getlogin (); | 36 | char * getlogin (void); |
| 37 | char * cuserid (char * s); | 37 | char * cuserid (char * s); |
| 38 | unsigned getuid (); | 38 | unsigned getuid (void); |
| 39 | unsigned getegid (); | 39 | unsigned getegid (void); |
| 40 | unsigned getgid (); | 40 | unsigned getgid (void); |
| 41 | int setuid (unsigned uid); | 41 | int setuid (unsigned uid); |
| 42 | int setegid (unsigned gid); | 42 | int setegid (unsigned gid); |
| 43 | char * getpass (const char * prompt); | 43 | char * getpass (const char * prompt); |