emacs-diffs
[Top][All Lists]
Advanced

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

master 8f52c5d: Fix compilation warnings in non-toolkit builds


From: Lars Ingebrigtsen
Subject: master 8f52c5d: Fix compilation warnings in non-toolkit builds
Date: Mon, 26 Apr 2021 22:25:36 -0400 (EDT)

branch: master
commit 8f52c5da76f7e536e83216a80887aab3294017be
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix compilation warnings in non-toolkit builds
    
    * src/xterm.c (x_create_toolkit_scroll_bar)
    (x_create_horizontal_toolkit_scroll_bar): String constants for
    XtSetArg are defined as const strings (in
    /usr/include/X11/Xaw3d/ThreeD.h, for instance), but the argument
    in XtSetArg is defined as either a const char* or a regular char*
    in /usr/include/X11/Intrinsic.h.  Cast the argument to String
    (which should be correct on all platforms, hopefully) to avoid a
    compilation warning (bug#47452).
---
 src/xterm.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index 744b80c..11de287 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -6223,7 +6223,7 @@ x_create_toolkit_scroll_bar (struct frame *f, struct 
scroll_bar *bar)
     /* But only if we have a small colormap.  Xaw3d can allocate nice
        colors itself.  */
     {
-      XtSetArg (av[ac], XtNbeNiceToColormap,
+      XtSetArg (av[ac], (String) XtNbeNiceToColormap,
                 DefaultDepthOfScreen (FRAME_X_SCREEN (f)) < 16);
       ++ac;
     }
@@ -6234,20 +6234,20 @@ x_create_toolkit_scroll_bar (struct frame *f, struct 
scroll_bar *bar)
     {
       /* This tells Xaw3d to use real colors instead of dithering for
         the shadows.  */
-      XtSetArg (av[ac], XtNbeNiceToColormap, False);
+      XtSetArg (av[ac], (String) XtNbeNiceToColormap, False);
       ++ac;
 
       /* Specify the colors.  */
       pixel = f->output_data.x->scroll_bar_top_shadow_pixel;
       if (pixel != -1)
        {
-         XtSetArg (av[ac], XtNtopShadowPixel, pixel);
+         XtSetArg (av[ac], (String) XtNtopShadowPixel, pixel);
          ++ac;
        }
       pixel = f->output_data.x->scroll_bar_bottom_shadow_pixel;
       if (pixel != -1)
        {
-         XtSetArg (av[ac], XtNbottomShadowPixel, pixel);
+         XtSetArg (av[ac], (String) XtNbottomShadowPixel, pixel);
          ++ac;
        }
     }
@@ -6424,7 +6424,7 @@ x_create_horizontal_toolkit_scroll_bar (struct frame *f, 
struct scroll_bar *bar)
     /* But only if we have a small colormap.  Xaw3d can allocate nice
        colors itself.  */
     {
-      XtSetArg (av[ac], XtNbeNiceToColormap,
+      XtSetArg (av[ac], (String) XtNbeNiceToColormap,
                 DefaultDepthOfScreen (FRAME_X_SCREEN (f)) < 16);
       ++ac;
     }
@@ -6435,20 +6435,20 @@ x_create_horizontal_toolkit_scroll_bar (struct frame 
*f, struct scroll_bar *bar)
     {
       /* This tells Xaw3d to use real colors instead of dithering for
         the shadows.  */
-      XtSetArg (av[ac], XtNbeNiceToColormap, False);
+      XtSetArg (av[ac], (String) XtNbeNiceToColormap, False);
       ++ac;
 
       /* Specify the colors.  */
       pixel = f->output_data.x->scroll_bar_top_shadow_pixel;
       if (pixel != -1)
        {
-         XtSetArg (av[ac], XtNtopShadowPixel, pixel);
+         XtSetArg (av[ac], (String) XtNtopShadowPixel, pixel);
          ++ac;
        }
       pixel = f->output_data.x->scroll_bar_bottom_shadow_pixel;
       if (pixel != -1)
        {
-         XtSetArg (av[ac], XtNbottomShadowPixel, pixel);
+         XtSetArg (av[ac], (String) XtNbottomShadowPixel, pixel);
          ++ac;
        }
     }



reply via email to

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