diff options
| author | Juanma Barranquero | 2011-10-27 02:59:21 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2011-10-27 02:59:21 +0200 |
| commit | 657d08d30a63536174fe9ec60b7f2cb8de541eb5 (patch) | |
| tree | 9578294de51056cd536639580dd0dcecc2922c8d | |
| parent | 6e724ca2c2e36dcd30803c314319b8faf8472e7d (diff) | |
| download | emacs-657d08d30a63536174fe9ec60b7f2cb8de541eb5.tar.gz emacs-657d08d30a63536174fe9ec60b7f2cb8de541eb5.zip | |
src/image.c, src/w32*.c, lib-src/emacsclient.c: Silence warnings under -Wall.
| -rw-r--r-- | lib-src/ChangeLog | 4 | ||||
| -rw-r--r-- | lib-src/emacsclient.c | 4 | ||||
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/image.c | 2 | ||||
| -rw-r--r-- | src/w32.c | 6 | ||||
| -rw-r--r-- | src/w32font.c | 4 | ||||
| -rw-r--r-- | src/w32reg.c | 7 |
7 files changed, 22 insertions, 12 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 984c4d6c880..a8f9a0ac4be 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-10-27 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * emacsclient.c (w32_getenv): Silence compiler warnings. | ||
| 4 | |||
| 1 | 2011-09-07 Glenn Morris <rgm@gnu.org> | 5 | 2011-09-07 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * etags.c (Fortran_functions): Handle "elemental" functions. | 7 | * etags.c (Fortran_functions): Handle "elemental" functions. |
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index ece9dc65c49..76aa21884de 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -359,7 +359,7 @@ w32_getenv (char *envvar) | |||
| 359 | char *value; | 359 | char *value; |
| 360 | DWORD dwType; | 360 | DWORD dwType; |
| 361 | 361 | ||
| 362 | if (value = getenv (envvar)) | 362 | if ((value = getenv (envvar))) |
| 363 | /* Found in the environment. strdup it, because values returned | 363 | /* Found in the environment. strdup it, because values returned |
| 364 | by getenv cannot be free'd. */ | 364 | by getenv cannot be free'd. */ |
| 365 | return xstrdup (value); | 365 | return xstrdup (value); |
| @@ -382,7 +382,7 @@ w32_getenv (char *envvar) | |||
| 382 | { | 382 | { |
| 383 | DWORD size; | 383 | DWORD size; |
| 384 | 384 | ||
| 385 | if (size = ExpandEnvironmentStrings (value, NULL, 0)) | 385 | if ((size = ExpandEnvironmentStrings (value, NULL, 0))) |
| 386 | { | 386 | { |
| 387 | char *buffer = (char *) xmalloc (size); | 387 | char *buffer = (char *) xmalloc (size); |
| 388 | if (ExpandEnvironmentStrings (value, buffer, size)) | 388 | if (ExpandEnvironmentStrings (value, buffer, size)) |
diff --git a/src/ChangeLog b/src/ChangeLog index b3d8d4d10ca..3caecf32049 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2011-10-27 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * image.c (x_create_x_image_and_pixmap): | ||
| 4 | * w32.c (sys_rename, w32_delayed_load): | ||
| 5 | * w32font.c (fill_in_logfont): | ||
| 6 | * w32reg.c (x_get_string_resource): Silence compiler warnings. | ||
| 7 | |||
| 1 | 2011-10-26 Juanma Barranquero <lekktu@gmail.com> | 8 | 2011-10-26 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 9 | ||
| 3 | * w32fns.c (w32_default_color_map): New function, | 10 | * w32fns.c (w32_default_color_map): New function, |
diff --git a/src/image.c b/src/image.c index ef72745a72f..14c74f10607 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -2015,7 +2015,7 @@ x_create_x_image_and_pixmap (struct frame *f, int width, int height, int depth, | |||
| 2015 | /* Bitmaps with a depth less than 16 need a palette. */ | 2015 | /* Bitmaps with a depth less than 16 need a palette. */ |
| 2016 | /* BITMAPINFO structure already contains the first RGBQUAD. */ | 2016 | /* BITMAPINFO structure already contains the first RGBQUAD. */ |
| 2017 | if (depth < 16) | 2017 | if (depth < 16) |
| 2018 | palette_colors = 1 << depth - 1; | 2018 | palette_colors = 1 << (depth - 1); |
| 2019 | 2019 | ||
| 2020 | *ximg = xmalloc (sizeof (XImage) + palette_colors * sizeof (RGBQUAD)); | 2020 | *ximg = xmalloc (sizeof (XImage) + palette_colors * sizeof (RGBQUAD)); |
| 2021 | 2021 | ||
| @@ -2892,12 +2892,12 @@ sys_rename (const char * oldname, const char * newname) | |||
| 2892 | int i = 0; | 2892 | int i = 0; |
| 2893 | 2893 | ||
| 2894 | oldname = map_w32_filename (oldname, NULL); | 2894 | oldname = map_w32_filename (oldname, NULL); |
| 2895 | if (o = strrchr (oldname, '\\')) | 2895 | if ((o = strrchr (oldname, '\\'))) |
| 2896 | o++; | 2896 | o++; |
| 2897 | else | 2897 | else |
| 2898 | o = (char *) oldname; | 2898 | o = (char *) oldname; |
| 2899 | 2899 | ||
| 2900 | if (p = strrchr (temp, '\\')) | 2900 | if ((p = strrchr (temp, '\\'))) |
| 2901 | p++; | 2901 | p++; |
| 2902 | else | 2902 | else |
| 2903 | p = temp; | 2903 | p = temp; |
| @@ -5756,7 +5756,7 @@ w32_delayed_load (Lisp_Object libraries, Lisp_Object library_id) | |||
| 5756 | for (dlls = XCDR (dlls); CONSP (dlls); dlls = XCDR (dlls)) | 5756 | for (dlls = XCDR (dlls); CONSP (dlls); dlls = XCDR (dlls)) |
| 5757 | { | 5757 | { |
| 5758 | CHECK_STRING_CAR (dlls); | 5758 | CHECK_STRING_CAR (dlls); |
| 5759 | if (library_dll = LoadLibrary (SDATA (XCAR (dlls)))) | 5759 | if ((library_dll = LoadLibrary (SDATA (XCAR (dlls))))) |
| 5760 | { | 5760 | { |
| 5761 | found = XCAR (dlls); | 5761 | found = XCAR (dlls); |
| 5762 | break; | 5762 | break; |
diff --git a/src/w32font.c b/src/w32font.c index 985370c15c1..f47b7a46b1e 100644 --- a/src/w32font.c +++ b/src/w32font.c | |||
| @@ -1916,10 +1916,10 @@ fill_in_logfont (FRAME_PTR f, LOGFONT *logfont, Lisp_Object font_spec) | |||
| 1916 | int spacing = XINT (tmp); | 1916 | int spacing = XINT (tmp); |
| 1917 | if (spacing < FONT_SPACING_MONO) | 1917 | if (spacing < FONT_SPACING_MONO) |
| 1918 | logfont->lfPitchAndFamily | 1918 | logfont->lfPitchAndFamily |
| 1919 | = logfont->lfPitchAndFamily & 0xF0 | VARIABLE_PITCH; | 1919 | = (logfont->lfPitchAndFamily & 0xF0) | VARIABLE_PITCH; |
| 1920 | else | 1920 | else |
| 1921 | logfont->lfPitchAndFamily | 1921 | logfont->lfPitchAndFamily |
| 1922 | = logfont->lfPitchAndFamily & 0xF0 | FIXED_PITCH; | 1922 | = (logfont->lfPitchAndFamily & 0xF0) | FIXED_PITCH; |
| 1923 | } | 1923 | } |
| 1924 | 1924 | ||
| 1925 | /* Process EXTRA info. */ | 1925 | /* Process EXTRA info. */ |
diff --git a/src/w32reg.c b/src/w32reg.c index e1465be9e44..18374431062 100644 --- a/src/w32reg.c +++ b/src/w32reg.c | |||
| @@ -147,9 +147,9 @@ x_get_string_resource (XrmDatabase rdb, char *name, char *class) | |||
| 147 | { | 147 | { |
| 148 | char *resource; | 148 | char *resource; |
| 149 | 149 | ||
| 150 | if (resource = w32_get_rdb_resource (rdb, name)) | 150 | if ((resource = w32_get_rdb_resource (rdb, name))) |
| 151 | return resource; | 151 | return resource; |
| 152 | if (resource = w32_get_rdb_resource (rdb, class)) | 152 | if ((resource = w32_get_rdb_resource (rdb, class))) |
| 153 | return resource; | 153 | return resource; |
| 154 | } | 154 | } |
| 155 | 155 | ||
| @@ -157,6 +157,5 @@ x_get_string_resource (XrmDatabase rdb, char *name, char *class) | |||
| 157 | /* --quick was passed, so this is a no-op. */ | 157 | /* --quick was passed, so this is a no-op. */ |
| 158 | return NULL; | 158 | return NULL; |
| 159 | 159 | ||
| 160 | return (w32_get_string_resource (name, class, REG_SZ)); | 160 | return w32_get_string_resource (name, class, REG_SZ); |
| 161 | } | 161 | } |
| 162 | |||