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.
This commit is contained in:
parent
ce106f3de6
commit
a8d37ca628
1 changed files with 10 additions and 10 deletions
20
src/w32.c
20
src/w32.c
|
@ -1513,7 +1513,7 @@ codepage_for_filenames (CPINFO *cp_info)
|
||||||
|
|
||||||
if (NILP (current_encoding))
|
if (NILP (current_encoding))
|
||||||
{
|
{
|
||||||
char *cpname = SDATA (SYMBOL_NAME (current_encoding));
|
char *cpname = SSDATA (SYMBOL_NAME (current_encoding));
|
||||||
char *cp = NULL, *end;
|
char *cp = NULL, *end;
|
||||||
int cpnum;
|
int cpnum;
|
||||||
|
|
||||||
|
@ -2165,11 +2165,11 @@ unixtodos_filename (register char *p)
|
||||||
(From msdos.c...probably should figure out a way to share it,
|
(From msdos.c...probably should figure out a way to share it,
|
||||||
although this code isn't going to ever change.) */
|
although this code isn't going to ever change.) */
|
||||||
static int
|
static int
|
||||||
crlf_to_lf (register int n, register unsigned char *buf)
|
crlf_to_lf (register int n, register char *buf)
|
||||||
{
|
{
|
||||||
unsigned char *np = buf;
|
unsigned char *np = (unsigned char *)buf;
|
||||||
unsigned char *startp = buf;
|
unsigned char *startp = np;
|
||||||
unsigned char *endp = buf + n;
|
char *endp = buf + n;
|
||||||
|
|
||||||
if (n == 0)
|
if (n == 0)
|
||||||
return n;
|
return n;
|
||||||
|
@ -2386,7 +2386,7 @@ ansi_encode_filename (Lisp_Object filename)
|
||||||
{
|
{
|
||||||
char shortname[MAX_PATH];
|
char shortname[MAX_PATH];
|
||||||
|
|
||||||
if (w32_get_short_filename (SDATA (filename), shortname, MAX_PATH))
|
if (w32_get_short_filename (SSDATA (filename), shortname, MAX_PATH))
|
||||||
{
|
{
|
||||||
dostounix_filename (shortname);
|
dostounix_filename (shortname);
|
||||||
encoded_filename = build_string (shortname);
|
encoded_filename = build_string (shortname);
|
||||||
|
@ -7495,7 +7495,7 @@ socket_to_fd (SOCKET s)
|
||||||
though the socket wasn't really a kernel handle,
|
though the socket wasn't really a kernel handle,
|
||||||
because a real handle has the same value. So
|
because a real handle has the same value. So
|
||||||
test whether the new handle really is a socket. */
|
test whether the new handle really is a socket. */
|
||||||
long nonblocking = 0;
|
unsigned long nonblocking = 0;
|
||||||
if (pfn_ioctlsocket ((SOCKET) new_s, FIONBIO, &nonblocking) == 0)
|
if (pfn_ioctlsocket ((SOCKET) new_s, FIONBIO, &nonblocking) == 0)
|
||||||
{
|
{
|
||||||
pfn_closesocket (s);
|
pfn_closesocket (s);
|
||||||
|
@ -8520,7 +8520,7 @@ sys_write (int fd, const void * buffer, unsigned int count)
|
||||||
int nbytes = count;
|
int nbytes = count;
|
||||||
|
|
||||||
SAFE_NALLOCA (tmpbuf, 2, count);
|
SAFE_NALLOCA (tmpbuf, 2, count);
|
||||||
dst = tmpbuf;
|
dst = (unsigned char *)tmpbuf;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
@ -9062,8 +9062,8 @@ check_windows_init_file (void)
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
Lisp_Object load_path_print = Fprin1_to_string (Vload_path, Qnil);
|
Lisp_Object load_path_print = Fprin1_to_string (Vload_path, Qnil);
|
||||||
char *init_file_name = SDATA (init_file);
|
char *init_file_name = SSDATA (init_file);
|
||||||
char *load_path = SDATA (load_path_print);
|
char *load_path = SSDATA (load_path_print);
|
||||||
char *buffer = alloca (1024
|
char *buffer = alloca (1024
|
||||||
+ strlen (init_file_name)
|
+ strlen (init_file_name)
|
||||||
+ strlen (load_path));
|
+ strlen (load_path));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue