emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/gnus-cloud 3706ef2 11/61: Merge branch 'master' of


From: Teodor Zlatanov
Subject: [Emacs-diffs] scratch/gnus-cloud 3706ef2 11/61: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Date: Fri, 1 Jul 2016 17:37:51 +0000 (UTC)

branch: scratch/gnus-cloud
commit 3706ef256ca75a7dde78d8ab0b23879a514a1fed
Merge: 4fd911a 560c4ab
Author: Ted Zlatanov <address@hidden>
Commit: Ted Zlatanov <address@hidden>

    Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
---
 src/conf_post.h |    3 ++-
 src/image.c     |    7 +++++--
 src/lisp.h      |    4 +++-
 src/menu.c      |    4 ----
 src/w32fns.c    |   17 ++++++++++-------
 src/w32font.c   |    4 ++--
 src/w32menu.c   |    8 ++++----
 src/w32term.c   |    4 +++-
 src/w32term.h   |    2 +-
 9 files changed, 30 insertions(+), 23 deletions(-)

diff --git a/src/conf_post.h b/src/conf_post.h
index 4459caf..431b7a9 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -211,7 +211,8 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
 extern void _DebPrint (const char *fmt, ...);
 #  define DebPrint(stuff) _DebPrint stuff
 # else
-#  define DebPrint(stuff)
+/* Avoid compiler warnings about empty body of 'if' statement.  */
+#  define DebPrint(stuff) do {} while (false)
 # endif
 #endif
 
diff --git a/src/image.c b/src/image.c
index 657852b..0df415c 100644
--- a/src/image.c
+++ b/src/image.c
@@ -80,7 +80,9 @@ typedef struct w32_bitmap_record Bitmap_Record;
 #define PIX_MASK_DRAW  1
 
 #define x_defined_color w32_defined_color
+#if 0                          /* unused */
 #define DefaultDepthOfScreen(screen) (one_w32_display_info.n_cbits)
+#endif
 
 #endif /* HAVE_NTGUI */
 
@@ -223,6 +225,7 @@ x_create_bitmap_from_data (struct frame *f, char *bits, 
unsigned int width, unsi
 #endif /* HAVE_X_WINDOWS */
 
 #ifdef HAVE_NTGUI
+  Lisp_Object frame UNINIT;    /* The value is not used.  */
   Pixmap bitmap;
   bitmap = CreateBitmap (width, height,
                         FRAME_DISPLAY_INFO (XFRAME (frame))->n_planes,
@@ -272,9 +275,9 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object 
file)
 {
 #ifdef HAVE_NTGUI
   return -1;  /* W32_TODO : bitmap support */
-#endif /* HAVE_NTGUI */
-
+#else
   Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
+#endif
 
 #ifdef HAVE_NS
   ptrdiff_t id;
diff --git a/src/lisp.h b/src/lisp.h
index e0eb52a..6a8f829 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -4634,8 +4634,10 @@ enum
    STR's value is not necessarily copied.  The resulting Lisp string
    should not be modified or made visible to user code.  */
 
+/* Avoid initializing NAME to prevent "jump-misses-init" compiler
+   warnings.  */
 #define AUTO_STRING_WITH_LEN(name, str, len)                           \
-  Lisp_Object name =                                                   \
+  Lisp_Object name; name =                                             \
     (USE_STACK_STRING                                                  \
      ? (make_lisp_ptr                                                  \
        ((&(union Aligned_String)                                       \
diff --git a/src/menu.c b/src/menu.c
index e3d943e..90bb19a 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -42,11 +42,7 @@ along with GNU Emacs.  If not, see 
<http://www.gnu.org/licenses/>.  */
 #endif /* HAVE_WINDOW_SYSTEM */
 
 #ifdef HAVE_NTGUI
-# ifdef NTGUI_UNICODE
-# define unicode_append_menu AppendMenuW
-# else /* !NTGUI_UNICODE */
 extern AppendMenuW_Proc unicode_append_menu;
-# endif /* NTGUI_UNICODE */
 #endif /* HAVE_NTGUI  */
 
 #include "menu.h"
diff --git a/src/w32fns.c b/src/w32fns.c
index f2b438c..bc9c747 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -186,11 +186,7 @@ MonitorFromWindow_Proc monitor_from_window_fn = NULL;
 EnumDisplayMonitors_Proc enum_display_monitors_fn = NULL;
 GetTitleBarInfo_Proc get_title_bar_info_fn = NULL;
 
-#ifdef NTGUI_UNICODE
-#define unicode_append_menu AppendMenuW
-#else /* !NTGUI_UNICODE */
 extern AppendMenuW_Proc unicode_append_menu;
-#endif /* NTGUI_UNICODE */
 
 /* Flag to selectively ignore WM_IME_CHAR messages.  */
 static int ignore_ime_char = 0;
@@ -2406,6 +2402,7 @@ hook_w32_key (int hook, int modifier, int vkey)
     }
 }
 
+#ifdef WINDOWSNT
 /* Check the current Win key pressed state.  */
 int
 check_w32_winkey_state (int vkey)
@@ -2433,6 +2430,7 @@ check_w32_winkey_state (int vkey)
     }
   return 0;
 }
+#endif /* WINDOWSNT */
 
 /* Reset the keyboard hook state.  Locking the workstation with Win-L
    leaves the Win key(s) "down" from the hook's point of view - the
@@ -2623,8 +2621,10 @@ modifier_set (int vkey)
       else
        return (GetKeyState (vkey) & 0x1);
     }
+#ifdef WINDOWSNT
   if (w32_kbdhook_active && (vkey == VK_LWIN || vkey == VK_RWIN))
     return check_w32_winkey_state (vkey);
+#endif
 
   if (!modifiers_recorded)
     return (GetKeyState (vkey) & 0x8000);
@@ -7043,6 +7043,7 @@ Text larger than the specified size is clipped.  */)
 
       /* Create a frame for the tooltip, and record it in the global
         variable tip_frame.  */
+      struct frame *f;         /* The value is unused.  */
       if (NILP (tip_frame = x_create_tip_frame (FRAME_DISPLAY_INFO (f), 
parms)))
        {
          /* Creating the tip frame failed.  */
@@ -7288,7 +7289,9 @@ value of DIR as in previous invocations; this is standard 
Windows behavior.  */)
 {
   /* Filter index: 1: All Files, 2: Directories only  */
   static const wchar_t filter_w[] = L"All Files 
(*.*)\0*.*\0Directories\0*|*\0";
+#ifndef NTGUI_UNICODE
   static const char filter_a[] = "All Files (*.*)\0*.*\0Directories\0*|*\0";
+#endif
 
   Lisp_Object filename = default_filename;
   struct frame *f = SELECTED_FRAME ();
@@ -8962,7 +8965,7 @@ w32_strerror (int error_no)
       --ret;
   buf[ret] = '\0';
   if (!ret)
-    sprintf (buf, "w32 error %u", error_no);
+    sprintf (buf, "w32 error %d", error_no);
 
   return buf;
 }
@@ -10331,8 +10334,8 @@ emacs_abort (void)
               but not on Windows 7.  addr2line doesn't mind a missing
               "0x", but will be confused by an extra one.  */
            if (except_addr)
-             sprintf (buf, "\r\nException 0x%lx at this address:\r\n%p\r\n",
-                      except_code, except_addr);
+             sprintf (buf, "\r\nException 0x%x at this address:\r\n%p\r\n",
+                      (unsigned int) except_code, except_addr);
            if (stderr_fd >= 0)
              {
                if (except_addr)
diff --git a/src/w32font.c b/src/w32font.c
index b8884a5..4d15cff 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -1747,7 +1747,7 @@ w32_to_x_charset (int fncharset, char *matching)
 
     default:
       /* Encode numerical value of unknown charset.  */
-      sprintf (buf, "*-#%u", fncharset);
+      sprintf (buf, "*-#%d", fncharset);
       return buf;
     }
 
@@ -1834,7 +1834,7 @@ w32_to_x_charset (int fncharset, char *matching)
     /* If no match, encode the numeric value. */
     if (!best_match)
       {
-        sprintf (buf, "*-#%u", fncharset);
+        sprintf (buf, "*-#%d", fncharset);
         return buf;
       }
 
diff --git a/src/w32menu.c b/src/w32menu.c
index fecbf33..13296d9 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -77,10 +77,10 @@ typedef int (WINAPI * MessageBoxW_Proc) (
     IN UINT type);
 
 #ifdef NTGUI_UNICODE
-#define get_menu_item_info GetMenuItemInfoA
-#define set_menu_item_info SetMenuItemInfoA
-#define unicode_append_menu AppendMenuW
-#define unicode_message_box MessageBoxW
+GetMenuItemInfoA_Proc get_menu_item_info = GetMenuItemInfoA;
+SetMenuItemInfoA_Proc set_menu_item_info = SetMenuItemInfoA;
+AppendMenuW_Proc unicode_append_menu = AppendMenuW;
+MessageBoxW_Proc unicode_message_box = MessageBoxW;
 #else /* !NTGUI_UNICODE */
 GetMenuItemInfoA_Proc get_menu_item_info = NULL;
 SetMenuItemInfoA_Proc set_menu_item_info = NULL;
diff --git a/src/w32term.c b/src/w32term.c
index c16c8f4..7ef3407 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -1434,7 +1434,7 @@ x_draw_glyphless_glyph_string_foreground (struct 
glyph_string *s)
        {
          sprintf ((char *) buf, "%0*X",
                   glyph->u.glyphless.ch < 0x10000 ? 4 : 6,
-                  glyph->u.glyphless.ch);
+                  (unsigned int) glyph->u.glyphless.ch);
          str = buf;
        }
 
@@ -4198,6 +4198,7 @@ w32_scroll_bar_handle_click (struct scroll_bar *bar, 
W32Msg *msg,
       y = si.nPos;
 
     bar->dragging = 0;
+    struct frame *f;           /* Value is not used.  */
     FRAME_DISPLAY_INFO (f)->last_mouse_scroll_bar_pos = msg->msg.wParam;
 
     switch (sb_event)
@@ -4313,6 +4314,7 @@ w32_horizontal_scroll_bar_handle_click (struct scroll_bar 
*bar, W32Msg *msg,
     y = si.nMax - si.nPage;
 
     bar->dragging = 0;
+    struct frame *f;           /* Value is not used.  */
     FRAME_DISPLAY_INFO (f)->last_mouse_scroll_bar_pos = msg->msg.wParam;
 
     switch (sb_event)
diff --git a/src/w32term.h b/src/w32term.h
index e134da5..3204770 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -399,7 +399,7 @@ extern struct w32_output w32term_display;
 #define FRAME_BASELINE_OFFSET(f) ((f)->output_data.w32->baseline_offset)
 
 /* This gives the w32_display_info structure for the display F is on.  */
-#define FRAME_DISPLAY_INFO(f) (&one_w32_display_info)
+#define FRAME_DISPLAY_INFO(f) ((void) (f), (&one_w32_display_info))
 
 /* This is the `Display *' which frame F is on.  */
 #define FRAME_X_DISPLAY(f) (0)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]