From 8b8feebc1b87015a3dc2c73d7fd63d3e2cc060f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Wed, 10 Aug 2011 16:07:04 +0200 Subject: [PATCH] wmmixer: Warnings about g++ const removed --- wmmixer/XPM/icons.xpm | 2 +- wmmixer/XPM/norec.xpm | 2 +- wmmixer/XPM/tile.xpm | 2 +- wmmixer/XPM/wmmixer.xpm | 2 +- wmmixer/mixctl.cc | 8 ++++---- wmmixer/xhandler.cc | 24 ++++++++++++------------ 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/wmmixer/XPM/icons.xpm b/wmmixer/XPM/icons.xpm index d34aac7..1cdf1f9 100644 --- a/wmmixer/XPM/icons.xpm +++ b/wmmixer/XPM/icons.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * icons_xpm[] = { +static char const *icons_xpm[] = { "220 22 4 1", " c #282828 s back_color", ". c #00ffff s led_color_high", diff --git a/wmmixer/XPM/norec.xpm b/wmmixer/XPM/norec.xpm index eaf0106..36acd81 100644 --- a/wmmixer/XPM/norec.xpm +++ b/wmmixer/XPM/norec.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * norec_xpm[] = { +static char const *norec_xpm[] = { "10 9 3 1", " c None", ". c #AEAAAE", diff --git a/wmmixer/XPM/tile.xpm b/wmmixer/XPM/tile.xpm index e65c234..6ef8ac7 100644 --- a/wmmixer/XPM/tile.xpm +++ b/wmmixer/XPM/tile.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char *tile_xpm[] = { +static char const *tile_xpm[] = { "64 64 54 1", " c #F3CEF3CEF3CE", ". c #000000000000", diff --git a/wmmixer/XPM/wmmixer.xpm b/wmmixer/XPM/wmmixer.xpm index d3ec49c..0abf143 100644 --- a/wmmixer/XPM/wmmixer.xpm +++ b/wmmixer/XPM/wmmixer.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * wmmixer_xpm[] = { +static char const *wmmixer_xpm[] = { "64 64 10 1", " c None", ". c #000000", diff --git a/wmmixer/mixctl.cc b/wmmixer/mixctl.cc index 10de39d..10a40b3 100644 --- a/wmmixer/mixctl.cc +++ b/wmmixer/mixctl.cc @@ -23,8 +23,8 @@ MixCtl::MixCtl(char *device_name) throw(MixerDeviceException) if((mixfd = open(device_,O_RDONLY | O_NONBLOCK)) != -1) { num_devices_ = SOUND_MIXER_NRDEVICES; - char *devnames[] = SOUND_DEVICE_NAMES; - char *devlabels[] = SOUND_DEVICE_LABELS; + const char *devnames[] = SOUND_DEVICE_NAMES; + const char *devlabels[] = SOUND_DEVICE_LABELS; ioctl(mixfd, SOUND_MIXER_READ_DEVMASK, &devmask); ioctl(mixfd, SOUND_MIXER_READ_STEREODEVS, &stmask); ioctl(mixfd, SOUND_MIXER_READ_RECMASK, &recmask); @@ -39,8 +39,8 @@ MixCtl::MixCtl(char *device_name) throw(MixerDeviceException) mixer_devices_[count].stereo = stmask & mixmask; mixer_devices_[count].records = recmask & mixmask; mixer_devices_[count].mask = mixmask; - mixer_devices_[count].name = devnames[count]; - mixer_devices_[count].label = devlabels[count]; + mixer_devices_[count].name = (char *) devnames[count]; + mixer_devices_[count].label = (char *) devlabels[count]; mixer_devices_[count].muted = 0; mixmask*=2; } diff --git a/wmmixer/xhandler.cc b/wmmixer/xhandler.cc index 2d56813..506bf18 100644 --- a/wmmixer/xhandler.cc +++ b/wmmixer/xhandler.cc @@ -403,22 +403,22 @@ void XHandler::initGraphicsContext() //-------------------------------------------------------------------- void XHandler::initPixmaps(int display_depth) { - XpmColorSymbol xpmcsym[4]={{"back_color", NULL, colors_[0]}, - {"led_color_high", NULL, colors_[1]}, - {"led_color_med", NULL, colors_[2]}, - {"led_color_low", NULL, colors_[3]}}; + XpmColorSymbol const xpmcsym[4]={{(char *)"back_color", NULL, colors_[0]}, + {(char *)"led_color_high", NULL, colors_[1]}, + {(char *)"led_color_med", NULL, colors_[2]}, + {(char *)"led_color_low", NULL, colors_[3]}}; XpmAttributes xpmattr; xpmattr.numsymbols = 4; - xpmattr.colorsymbols = xpmcsym; + xpmattr.colorsymbols = (XpmColorSymbol *)xpmcsym; xpmattr.exactColors = false; xpmattr.closeness = 40000; xpmattr.valuemask = XpmColorSymbols | XpmExactColors | XpmCloseness; - XpmCreatePixmapFromData(display_default_, window_root_, wmmixer_xpm, &pixmap_main, &pixmap_mask, &xpmattr); - XpmCreatePixmapFromData(display_default_, window_root_, tile_xpm, &pixmap_tile, NULL, &xpmattr); - XpmCreatePixmapFromData(display_default_, window_root_, icons_xpm, &pixmap_icon, NULL, &xpmattr); - XpmCreatePixmapFromData(display_default_, window_root_, norec_xpm, &pixmap_nrec, NULL, &xpmattr); + XpmCreatePixmapFromData(display_default_, window_root_, (char **)wmmixer_xpm, &pixmap_main, &pixmap_mask, &xpmattr); + XpmCreatePixmapFromData(display_default_, window_root_, (char **)tile_xpm, &pixmap_tile, NULL, &xpmattr); + XpmCreatePixmapFromData(display_default_, window_root_, (char **)icons_xpm, &pixmap_icon, NULL, &xpmattr); + XpmCreatePixmapFromData(display_default_, window_root_, (char **)norec_xpm, &pixmap_nrec, NULL, &xpmattr); pixmap_disp = XCreatePixmap(display_default_, window_root_, 64, 64, display_depth); } @@ -461,8 +461,8 @@ void XHandler::initWindow(int argc, char** argv) window_root_ = RootWindow(display_default_, screen); - back_pix = getColor("white"); - fore_pix = getColor("black"); + back_pix = getColor((char *)"white"); + fore_pix = getColor((char *)"black"); window_main_ = XCreateSimpleWindow(display_default_, window_root_, shints.x, shints.y, shints.width, shints.height, 0, fore_pix, back_pix); @@ -495,7 +495,7 @@ void XHandler::initWindow(int argc, char** argv) wmhints.flags = WindowGroupHint | StateHint; } - classHint.res_name=NAME; + classHint.res_name=(char *)NAME; classHint.res_class = window_class_; XSetClassHint(display_default_, window_main_, &classHint);