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.
This commit is contained in:
Eli Zaretskii 2012-10-02 19:55:29 +02:00
parent a96e1cb758
commit d8ab37a818
4 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2012-10-02 Eli Zaretskii <eliz@gnu.org>
* preprep.c (RVA_TO_PTR): Cast the result to 'void *', to avoid
compiler warnings when using the value.
2012-10-01 Eli Zaretskii <eliz@gnu.org>
* preprep.c (RVA_TO_PTR): Use 'unsigned char *' instead of

View file

@ -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))

View file

@ -1,3 +1,8 @@
2012-10-02 Eli Zaretskii <eliz@gnu.org>
* 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 <eggert@cs.ucla.edu>
Prefer plain 'static' to 'static inline' (Bug#12541).

View file

@ -1132,7 +1132,7 @@ sys_wait (int *status)
else if (WIFSIGNALED (retval))
{
int code = WTERMSIG (retval);
char *signame;
const char *signame;
synchronize_system_messages_locale ();
signame = strsignal (code);