1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-03 20:24:29 +00:00

src/image.c, src/w32*.c, lib-src/emacsclient.c: Silence warnings under -Wall.

This commit is contained in:
Juanma Barranquero 2011-10-27 02:59:21 +02:00
parent 6e724ca2c2
commit 657d08d30a
7 changed files with 22 additions and 12 deletions

View File

@ -1,3 +1,7 @@
2011-10-27 Juanma Barranquero <lekktu@gmail.com>
* emacsclient.c (w32_getenv): Silence compiler warnings.
2011-09-07 Glenn Morris <rgm@gnu.org>
* etags.c (Fortran_functions): Handle "elemental" functions.

View File

@ -359,7 +359,7 @@ w32_getenv (char *envvar)
char *value;
DWORD dwType;
if (value = getenv (envvar))
if ((value = getenv (envvar)))
/* Found in the environment. strdup it, because values returned
by getenv cannot be free'd. */
return xstrdup (value);
@ -382,7 +382,7 @@ w32_getenv (char *envvar)
{
DWORD size;
if (size = ExpandEnvironmentStrings (value, NULL, 0))
if ((size = ExpandEnvironmentStrings (value, NULL, 0)))
{
char *buffer = (char *) xmalloc (size);
if (ExpandEnvironmentStrings (value, buffer, size))

View File

@ -1,3 +1,10 @@
2011-10-27 Juanma Barranquero <lekktu@gmail.com>
* image.c (x_create_x_image_and_pixmap):
* w32.c (sys_rename, w32_delayed_load):
* w32font.c (fill_in_logfont):
* w32reg.c (x_get_string_resource): Silence compiler warnings.
2011-10-26 Juanma Barranquero <lekktu@gmail.com>
* w32fns.c (w32_default_color_map): New function,

View File

@ -2015,7 +2015,7 @@ x_create_x_image_and_pixmap (struct frame *f, int width, int height, int depth,
/* Bitmaps with a depth less than 16 need a palette. */
/* BITMAPINFO structure already contains the first RGBQUAD. */
if (depth < 16)
palette_colors = 1 << depth - 1;
palette_colors = 1 << (depth - 1);
*ximg = xmalloc (sizeof (XImage) + palette_colors * sizeof (RGBQUAD));

View File

@ -2892,12 +2892,12 @@ sys_rename (const char * oldname, const char * newname)
int i = 0;
oldname = map_w32_filename (oldname, NULL);
if (o = strrchr (oldname, '\\'))
if ((o = strrchr (oldname, '\\')))
o++;
else
o = (char *) oldname;
if (p = strrchr (temp, '\\'))
if ((p = strrchr (temp, '\\')))
p++;
else
p = temp;
@ -5756,7 +5756,7 @@ w32_delayed_load (Lisp_Object libraries, Lisp_Object library_id)
for (dlls = XCDR (dlls); CONSP (dlls); dlls = XCDR (dlls))
{
CHECK_STRING_CAR (dlls);
if (library_dll = LoadLibrary (SDATA (XCAR (dlls))))
if ((library_dll = LoadLibrary (SDATA (XCAR (dlls)))))
{
found = XCAR (dlls);
break;

View File

@ -1916,10 +1916,10 @@ fill_in_logfont (FRAME_PTR f, LOGFONT *logfont, Lisp_Object font_spec)
int spacing = XINT (tmp);
if (spacing < FONT_SPACING_MONO)
logfont->lfPitchAndFamily
= logfont->lfPitchAndFamily & 0xF0 | VARIABLE_PITCH;
= (logfont->lfPitchAndFamily & 0xF0) | VARIABLE_PITCH;
else
logfont->lfPitchAndFamily
= logfont->lfPitchAndFamily & 0xF0 | FIXED_PITCH;
= (logfont->lfPitchAndFamily & 0xF0) | FIXED_PITCH;
}
/* Process EXTRA info. */

View File

@ -147,9 +147,9 @@ x_get_string_resource (XrmDatabase rdb, char *name, char *class)
{
char *resource;
if (resource = w32_get_rdb_resource (rdb, name))
if ((resource = w32_get_rdb_resource (rdb, name)))
return resource;
if (resource = w32_get_rdb_resource (rdb, class))
if ((resource = w32_get_rdb_resource (rdb, class)))
return resource;
}
@ -157,6 +157,5 @@ x_get_string_resource (XrmDatabase rdb, char *name, char *class)
/* --quick was passed, so this is a no-op. */
return NULL;
return (w32_get_string_resource (name, class, REG_SZ));
return w32_get_string_resource (name, class, REG_SZ);
}