aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Ingebrigtsen2021-04-27 04:25:23 +0200
committerLars Ingebrigtsen2021-04-27 04:25:30 +0200
commit8f52c5da76f7e536e83216a80887aab3294017be (patch)
treeb6a2abb92e2af3711130406126ae96c66f001d54 /src
parente1541b5cb425c87e86650873b51f699c43c44fe5 (diff)
downloademacs-8f52c5da76f7e536e83216a80887aab3294017be.tar.gz
emacs-8f52c5da76f7e536e83216a80887aab3294017be.zip
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).
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 744b80c68a0..11de287aecc 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)
6223 /* But only if we have a small colormap. Xaw3d can allocate nice 6223 /* But only if we have a small colormap. Xaw3d can allocate nice
6224 colors itself. */ 6224 colors itself. */
6225 { 6225 {
6226 XtSetArg (av[ac], XtNbeNiceToColormap, 6226 XtSetArg (av[ac], (String) XtNbeNiceToColormap,
6227 DefaultDepthOfScreen (FRAME_X_SCREEN (f)) < 16); 6227 DefaultDepthOfScreen (FRAME_X_SCREEN (f)) < 16);
6228 ++ac; 6228 ++ac;
6229 } 6229 }
@@ -6234,20 +6234,20 @@ x_create_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
6234 { 6234 {
6235 /* This tells Xaw3d to use real colors instead of dithering for 6235 /* This tells Xaw3d to use real colors instead of dithering for
6236 the shadows. */ 6236 the shadows. */
6237 XtSetArg (av[ac], XtNbeNiceToColormap, False); 6237 XtSetArg (av[ac], (String) XtNbeNiceToColormap, False);
6238 ++ac; 6238 ++ac;
6239 6239
6240 /* Specify the colors. */ 6240 /* Specify the colors. */
6241 pixel = f->output_data.x->scroll_bar_top_shadow_pixel; 6241 pixel = f->output_data.x->scroll_bar_top_shadow_pixel;
6242 if (pixel != -1) 6242 if (pixel != -1)
6243 { 6243 {
6244 XtSetArg (av[ac], XtNtopShadowPixel, pixel); 6244 XtSetArg (av[ac], (String) XtNtopShadowPixel, pixel);
6245 ++ac; 6245 ++ac;
6246 } 6246 }
6247 pixel = f->output_data.x->scroll_bar_bottom_shadow_pixel; 6247 pixel = f->output_data.x->scroll_bar_bottom_shadow_pixel;
6248 if (pixel != -1) 6248 if (pixel != -1)
6249 { 6249 {
6250 XtSetArg (av[ac], XtNbottomShadowPixel, pixel); 6250 XtSetArg (av[ac], (String) XtNbottomShadowPixel, pixel);
6251 ++ac; 6251 ++ac;
6252 } 6252 }
6253 } 6253 }
@@ -6424,7 +6424,7 @@ x_create_horizontal_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
6424 /* But only if we have a small colormap. Xaw3d can allocate nice 6424 /* But only if we have a small colormap. Xaw3d can allocate nice
6425 colors itself. */ 6425 colors itself. */
6426 { 6426 {
6427 XtSetArg (av[ac], XtNbeNiceToColormap, 6427 XtSetArg (av[ac], (String) XtNbeNiceToColormap,
6428 DefaultDepthOfScreen (FRAME_X_SCREEN (f)) < 16); 6428 DefaultDepthOfScreen (FRAME_X_SCREEN (f)) < 16);
6429 ++ac; 6429 ++ac;
6430 } 6430 }
@@ -6435,20 +6435,20 @@ x_create_horizontal_toolkit_scroll_bar (struct frame *f, struct scroll_bar *bar)
6435 { 6435 {
6436 /* This tells Xaw3d to use real colors instead of dithering for 6436 /* This tells Xaw3d to use real colors instead of dithering for
6437 the shadows. */ 6437 the shadows. */
6438 XtSetArg (av[ac], XtNbeNiceToColormap, False); 6438 XtSetArg (av[ac], (String) XtNbeNiceToColormap, False);
6439 ++ac; 6439 ++ac;
6440 6440
6441 /* Specify the colors. */ 6441 /* Specify the colors. */
6442 pixel = f->output_data.x->scroll_bar_top_shadow_pixel; 6442 pixel = f->output_data.x->scroll_bar_top_shadow_pixel;
6443 if (pixel != -1) 6443 if (pixel != -1)
6444 { 6444 {
6445 XtSetArg (av[ac], XtNtopShadowPixel, pixel); 6445 XtSetArg (av[ac], (String) XtNtopShadowPixel, pixel);
6446 ++ac; 6446 ++ac;
6447 } 6447 }
6448 pixel = f->output_data.x->scroll_bar_bottom_shadow_pixel; 6448 pixel = f->output_data.x->scroll_bar_bottom_shadow_pixel;
6449 if (pixel != -1) 6449 if (pixel != -1)
6450 { 6450 {
6451 XtSetArg (av[ac], XtNbottomShadowPixel, pixel); 6451 XtSetArg (av[ac], (String) XtNbottomShadowPixel, pixel);
6452 ++ac; 6452 ++ac;
6453 } 6453 }
6454 } 6454 }