[Pkg-wmaker-commits] [wmmixer] 05/16: wmmixer: Warnings about g++ const removed

Doug Torrance dtorrance-guest at moszumanska.debian.org
Tue Aug 29 09:59:07 UTC 2017


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch upstream
in repository wmmixer.

commit 7c2ceb3cffe4121655e4d1f6bf24087e8a6e3b26
Author: Rodolfo García Peñas (kix) <kix at kix.es>
Date:   Wed Aug 10 16:07:04 2011 +0200

    wmmixer: Warnings about g++ const removed
---
 XPM/icons.xpm   |  2 +-
 XPM/norec.xpm   |  2 +-
 XPM/tile.xpm    |  2 +-
 XPM/wmmixer.xpm |  2 +-
 mixctl.cc       |  8 ++++----
 xhandler.cc     | 24 ++++++++++++------------
 6 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/XPM/icons.xpm b/XPM/icons.xpm
index d34aac7..1cdf1f9 100644
--- a/XPM/icons.xpm
+++ b/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/XPM/norec.xpm b/XPM/norec.xpm
index eaf0106..36acd81 100644
--- a/XPM/norec.xpm
+++ b/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/XPM/tile.xpm b/XPM/tile.xpm
index e65c234..6ef8ac7 100644
--- a/XPM/tile.xpm
+++ b/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/XPM/wmmixer.xpm b/XPM/wmmixer.xpm
index d3ec49c..0abf143 100644
--- a/XPM/wmmixer.xpm
+++ b/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/mixctl.cc b/mixctl.cc
index 10de39d..10a40b3 100644
--- a/mixctl.cc
+++ b/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/xhandler.cc b/xhandler.cc
index 2d56813..506bf18 100644
--- a/xhandler.cc
+++ b/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);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmmixer.git



More information about the Pkg-wmaker-commits mailing list