aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2015-12-30 18:26:56 +0200
committerEli Zaretskii2015-12-30 18:26:56 +0200
commita8d37ca628b755907c3a6683111cf4189c2f4095 (patch)
tree4106765e97a12c54ef1a7e2a8539aa4f79e407e1 /src
parentce106f3de6b016a474e2591dea9226a3741effee (diff)
downloademacs-a8d37ca628b755907c3a6683111cf4189c2f4095.tar.gz
emacs-a8d37ca628b755907c3a6683111cf4189c2f4095.zip
Avoid some compiler warnings in w32.c
* src/w32.c (codepage_for_filenames, crlf_to_lf) (ansi_encode_filename, socket_to_fd, sys_write) (check_windows_init_file): Avoid compiler warnings about differences in pointer signedness.
Diffstat (limited to 'src')
-rw-r--r--src/w32.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/w32.c b/src/w32.c
index 9b1d94de786..773290fc2f0 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -1513,7 +1513,7 @@ codepage_for_filenames (CPINFO *cp_info)
1513 1513
1514 if (NILP (current_encoding)) 1514 if (NILP (current_encoding))
1515 { 1515 {
1516 char *cpname = SDATA (SYMBOL_NAME (current_encoding)); 1516 char *cpname = SSDATA (SYMBOL_NAME (current_encoding));
1517 char *cp = NULL, *end; 1517 char *cp = NULL, *end;
1518 int cpnum; 1518 int cpnum;
1519 1519
@@ -2165,11 +2165,11 @@ unixtodos_filename (register char *p)
2165 (From msdos.c...probably should figure out a way to share it, 2165 (From msdos.c...probably should figure out a way to share it,
2166 although this code isn't going to ever change.) */ 2166 although this code isn't going to ever change.) */
2167static int 2167static int
2168crlf_to_lf (register int n, register unsigned char *buf) 2168crlf_to_lf (register int n, register char *buf)
2169{ 2169{
2170 unsigned char *np = buf; 2170 unsigned char *np = (unsigned char *)buf;
2171 unsigned char *startp = buf; 2171 unsigned char *startp = np;
2172 unsigned char *endp = buf + n; 2172 char *endp = buf + n;
2173 2173
2174 if (n == 0) 2174 if (n == 0)
2175 return n; 2175 return n;
@@ -2386,7 +2386,7 @@ ansi_encode_filename (Lisp_Object filename)
2386 { 2386 {
2387 char shortname[MAX_PATH]; 2387 char shortname[MAX_PATH];
2388 2388
2389 if (w32_get_short_filename (SDATA (filename), shortname, MAX_PATH)) 2389 if (w32_get_short_filename (SSDATA (filename), shortname, MAX_PATH))
2390 { 2390 {
2391 dostounix_filename (shortname); 2391 dostounix_filename (shortname);
2392 encoded_filename = build_string (shortname); 2392 encoded_filename = build_string (shortname);
@@ -7495,7 +7495,7 @@ socket_to_fd (SOCKET s)
7495 though the socket wasn't really a kernel handle, 7495 though the socket wasn't really a kernel handle,
7496 because a real handle has the same value. So 7496 because a real handle has the same value. So
7497 test whether the new handle really is a socket. */ 7497 test whether the new handle really is a socket. */
7498 long nonblocking = 0; 7498 unsigned long nonblocking = 0;
7499 if (pfn_ioctlsocket ((SOCKET) new_s, FIONBIO, &nonblocking) == 0) 7499 if (pfn_ioctlsocket ((SOCKET) new_s, FIONBIO, &nonblocking) == 0)
7500 { 7500 {
7501 pfn_closesocket (s); 7501 pfn_closesocket (s);
@@ -8520,7 +8520,7 @@ sys_write (int fd, const void * buffer, unsigned int count)
8520 int nbytes = count; 8520 int nbytes = count;
8521 8521
8522 SAFE_NALLOCA (tmpbuf, 2, count); 8522 SAFE_NALLOCA (tmpbuf, 2, count);
8523 dst = tmpbuf; 8523 dst = (unsigned char *)tmpbuf;
8524 8524
8525 while (1) 8525 while (1)
8526 { 8526 {
@@ -9062,8 +9062,8 @@ check_windows_init_file (void)
9062 if (fd < 0) 9062 if (fd < 0)
9063 { 9063 {
9064 Lisp_Object load_path_print = Fprin1_to_string (Vload_path, Qnil); 9064 Lisp_Object load_path_print = Fprin1_to_string (Vload_path, Qnil);
9065 char *init_file_name = SDATA (init_file); 9065 char *init_file_name = SSDATA (init_file);
9066 char *load_path = SDATA (load_path_print); 9066 char *load_path = SSDATA (load_path_print);
9067 char *buffer = alloca (1024 9067 char *buffer = alloca (1024
9068 + strlen (init_file_name) 9068 + strlen (init_file_name)
9069 + strlen (load_path)); 9069 + strlen (load_path));