diff options
| author | Ken Brown | 2016-05-28 13:56:54 -0400 |
|---|---|---|
| committer | Ken Brown | 2016-05-28 13:56:54 -0400 |
| commit | b90e8904092eb7aa5b4cb3ede822d10422b70976 (patch) | |
| tree | 8006b1e7ef3083d96a9e494ee0fe6d588410172c /src | |
| parent | 4ef0fc192b8a10625053dbb9376c814e68612eb6 (diff) | |
| download | emacs-b90e8904092eb7aa5b4cb3ede822d10422b70976.tar.gz emacs-b90e8904092eb7aa5b4cb3ede822d10422b70976.zip | |
Avoid compiler warnings
* src/cygw32.c (chdir_to_default_directory): Use "void" as
argument list. Use SSDATA instead of SDATA.
* src/unexcw.c (fixup_executable): Use %td as format specifier for
argument of type ptrdiff_t. Use %zu for argument of type size_t.
Diffstat (limited to 'src')
| -rw-r--r-- | src/cygw32.c | 4 | ||||
| -rw-r--r-- | src/unexcw.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/cygw32.c b/src/cygw32.c index 682232035f6..ca9069a120b 100644 --- a/src/cygw32.c +++ b/src/cygw32.c | |||
| @@ -31,7 +31,7 @@ fchdir_unwind (int dir_fd) | |||
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | static void | 33 | static void |
| 34 | chdir_to_default_directory () | 34 | chdir_to_default_directory (void) |
| 35 | { | 35 | { |
| 36 | Lisp_Object new_cwd; | 36 | Lisp_Object new_cwd; |
| 37 | int old_cwd_fd = emacs_open (".", O_RDONLY | O_DIRECTORY, 0); | 37 | int old_cwd_fd = emacs_open (".", O_RDONLY | O_DIRECTORY, 0); |
| @@ -46,7 +46,7 @@ chdir_to_default_directory () | |||
| 46 | if (!STRINGP (new_cwd)) | 46 | if (!STRINGP (new_cwd)) |
| 47 | new_cwd = build_string ("/"); | 47 | new_cwd = build_string ("/"); |
| 48 | 48 | ||
| 49 | if (chdir (SDATA (ENCODE_FILE (new_cwd)))) | 49 | if (chdir (SSDATA (ENCODE_FILE (new_cwd)))) |
| 50 | error ("could not chdir: %s", strerror (errno)); | 50 | error ("could not chdir: %s", strerror (errno)); |
| 51 | } | 51 | } |
| 52 | 52 | ||
diff --git a/src/unexcw.c b/src/unexcw.c index ea678dd4c25..6343b38bcff 100644 --- a/src/unexcw.c +++ b/src/unexcw.c | |||
| @@ -147,7 +147,7 @@ fixup_executable (int fd) | |||
| 147 | assert (ret == my_edata - (char *) start_address); | 147 | assert (ret == my_edata - (char *) start_address); |
| 148 | ++found_data; | 148 | ++found_data; |
| 149 | if (debug_unexcw) | 149 | if (debug_unexcw) |
| 150 | printf (" .data, mem start %#lx mem length %d\n", | 150 | printf (" .data, mem start %#lx mem length %td\n", |
| 151 | start_address, my_edata - (char *) start_address); | 151 | start_address, my_edata - (char *) start_address); |
| 152 | if (debug_unexcw) | 152 | if (debug_unexcw) |
| 153 | printf (" .data, file start %d file length %d\n", | 153 | printf (" .data, file start %d file length %d\n", |
| @@ -213,7 +213,7 @@ fixup_executable (int fd) | |||
| 213 | sizeof (exe_header->section_header[i])); | 213 | sizeof (exe_header->section_header[i])); |
| 214 | assert (ret == sizeof (exe_header->section_header[i])); | 214 | assert (ret == sizeof (exe_header->section_header[i])); |
| 215 | if (debug_unexcw) | 215 | if (debug_unexcw) |
| 216 | printf (" seek to %ld, write %d\n", | 216 | printf (" seek to %ld, write %zu\n", |
| 217 | (long) ((char *) &exe_header->section_header[i] - | 217 | (long) ((char *) &exe_header->section_header[i] - |
| 218 | (char *) exe_header), | 218 | (char *) exe_header), |
| 219 | sizeof (exe_header->section_header[i])); | 219 | sizeof (exe_header->section_header[i])); |
| @@ -228,7 +228,7 @@ fixup_executable (int fd) | |||
| 228 | my_endbss - (char *) start_address); | 228 | my_endbss - (char *) start_address); |
| 229 | assert (ret == (my_endbss - (char *) start_address)); | 229 | assert (ret == (my_endbss - (char *) start_address)); |
| 230 | if (debug_unexcw) | 230 | if (debug_unexcw) |
| 231 | printf (" .bss, mem start %#lx mem length %d\n", | 231 | printf (" .bss, mem start %#lx mem length %td\n", |
| 232 | start_address, my_endbss - (char *) start_address); | 232 | start_address, my_endbss - (char *) start_address); |
| 233 | if (debug_unexcw) | 233 | if (debug_unexcw) |
| 234 | printf (" .bss, file start %d file length %d\n", | 234 | printf (" .bss, file start %d file length %d\n", |