]> git.eshelyaron.com Git - emacs.git/commitdiff
src/image.c, src/w32*.c, lib-src/emacsclient.c: Silence warnings under -Wall.
authorJuanma Barranquero <lekktu@gmail.com>
Thu, 27 Oct 2011 00:59:21 +0000 (02:59 +0200)
committerJuanma Barranquero <lekktu@gmail.com>
Thu, 27 Oct 2011 00:59:21 +0000 (02:59 +0200)
lib-src/ChangeLog
lib-src/emacsclient.c
src/ChangeLog
src/image.c
src/w32.c
src/w32font.c
src/w32reg.c

index 984c4d6c880a71a9c3458cf1df7af99ac519c45d..a8f9a0ac4bedf260af78cc063f7907317e98f2f6 100644 (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.
index ece9dc65c49bc0d5bceef3be5b0686f9b7643297..76aa21884dea891a6ec11630a2d556ecbf3289e5 100644 (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))
index b3d8d4d10ca98f5dcb4086b60ad61174dbc3a578..3caecf320496e165134378de959e070ad69593f0 100644 (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,
index ef72745a72f1b1cdac4ab78c7e40a49675a1b4b5..14c74f10607f1baadec62b39d661452fd9d2dca5 100644 (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));
 
index 91893ddfc6107605a587885de84fa8bc119a9f52..42546fc8d49159e876dbd38caad0d2d91121fa58 100644 (file)
--- a/src/w32.c
+++ b/src/w32.c
@@ -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;
index 985370c15c14aef91daea77f3982c92855231e07..f47b7a46b1e6a6079de4d3107993d94fdb24b0b8 100644 (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.  */
index e1465be9e44df605e98bf064a3dcd4b6b37a8403..18374431062cdb0459563322859843b7781f5c45 100644 (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);
 }
-