From: Eli Zaretskii Date: Tue, 2 Oct 2012 17:55:29 +0000 (+0200) Subject: Fix compilation warnings in the MS-Windows build. X-Git-Tag: emacs-24.2.90~241^2~33 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d8ab37a818c5ebec56354c84c37b9241cba457e8;p=emacs.git Fix compilation warnings in the MS-Windows build. src/w32proc.c (sys_wait): Declare 'signame' 'const char *', to be consistent with the change in return value of 'safe_strsignal'. nt/preprep.c (RVA_TO_PTR): Cast the result to 'void *', to avoid compiler warnings when using the value. --- diff --git a/nt/ChangeLog b/nt/ChangeLog index 42171de0322..b0dcb9982f1 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,8 @@ +2012-10-02 Eli Zaretskii + + * preprep.c (RVA_TO_PTR): Cast the result to 'void *', to avoid + compiler warnings when using the value. + 2012-10-01 Eli Zaretskii * preprep.c (RVA_TO_PTR): Use 'unsigned char *' instead of diff --git a/nt/preprep.c b/nt/preprep.c index 5a632b3875f..6976567e038 100644 --- a/nt/preprep.c +++ b/nt/preprep.c @@ -288,7 +288,7 @@ relocate_offset (DWORD_PTR offset, ((DWORD_PTR)(rva) - (section)->VirtualAddress) #define RVA_TO_PTR(var,section,filedata) \ - ((unsigned char *)(RVA_TO_OFFSET(var,section) + (filedata)->file_base)) + ((void *)((unsigned char *)(RVA_TO_OFFSET(var,section) + (filedata)->file_base))) /* Convert address in executing image to RVA. */ #define PTR_TO_RVA(ptr) ((DWORD_PTR)(ptr) - (DWORD_PTR) GetModuleHandle (NULL)) diff --git a/src/ChangeLog b/src/ChangeLog index df4dc76aa07..1a06b6b5d84 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-10-02 Eli Zaretskii + + * w32proc.c (sys_wait): Declare 'signame' 'const char *', to be + consistent with the change in return value of 'safe_strsignal'. + 2012-10-02 Paul Eggert Prefer plain 'static' to 'static inline' (Bug#12541). diff --git a/src/w32proc.c b/src/w32proc.c index 58e6117a7e8..56a60fbf25f 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -1132,7 +1132,7 @@ get_result: else if (WIFSIGNALED (retval)) { int code = WTERMSIG (retval); - char *signame; + const char *signame; synchronize_system_messages_locale (); signame = strsignal (code);