Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37723353
en ru br
ALT Linux repositórios
S:1.0.2-alt3
5.0: 1.0.2-alt1
4.1: 1.0.2-alt0.M41.1
4.0: 1.0.2-alt0.M40.1
3.0: 0.9.0-alt10

Group :: Jogos/Enigmas
RPM: kiki

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: kiki-1.0.2-debian-gcc-const-correctness.patch
Download


Silences tons of gcc warnings about const correctness.
Peter De Wachter (pdewacht@gmail.com)
placed in the public domain
Status: in upstream CVS
--- a/kodilib/src/tools/KKeySymbols.h
+++ b/kodilib/src/tools/KKeySymbols.h
@@ -5,7 +5,7 @@
 #ifndef __KKeySymbols
 #define __KKeySymbols
 
-static char *KDL_KEY_ICON_META[] =
+static const char *KDL_KEY_ICON_META[] =
 {
 // width height ncolors chars_per_pixel 
 "13 13 2 1",
@@ -28,7 +28,7 @@
 ".###.....###.",
 };
 
-static char *KDL_KEY_ICON_ALT[] =
+static const char *KDL_KEY_ICON_ALT[] =
 {
 // width height ncolors chars_per_pixel 
 "17 13 2 1",
@@ -51,7 +51,7 @@
 ".................",
 };
 
-static char *KDL_KEY_ICON_CTRL[] =
+static const char *KDL_KEY_ICON_CTRL[] =
 {
 // width height ncolors chars_per_pixel 
 "11 13 2 1",
@@ -74,7 +74,7 @@
 "...######..",
 };
 
-static char *KDL_KEY_ICON_SHIFT[] =
+static const char *KDL_KEY_ICON_SHIFT[] =
 {
 // width height ncolors chars_per_pixel 
 "13 13 2 1",
@@ -97,7 +97,7 @@
 "......#......",
 };
 
-static char *KDL_KEY_ICON_RETURN[] =
+static const char *KDL_KEY_ICON_RETURN[] =
 {
 // width height ncolors chars_per_pixel 
 "17 13 2 1",
@@ -120,7 +120,7 @@
 ".................",
 };
 
-static char *KDL_KEY_ICON_ENTER[] =
+static const char *KDL_KEY_ICON_ENTER[] =
 {
 // width height ncolors chars_per_pixel 
 "11 13 2 1",
@@ -143,7 +143,7 @@
 "...........",
 };
 
-static char *KDL_KEY_ICON_UP[] =
+static const char *KDL_KEY_ICON_UP[] =
 {
 // width height ncolors chars_per_pixel 
 "12 13 2 1",
@@ -166,7 +166,7 @@
 ".....##.....",
 };
 
-static char *KDL_KEY_ICON_DOWN[] =
+static const char *KDL_KEY_ICON_DOWN[] =
 {
 // width height ncolors chars_per_pixel 
 "12 13 2 1",
@@ -189,7 +189,7 @@
 ".....##.....",
 };
 
-static char *KDL_KEY_ICON_RIGHT[] =
+static const char *KDL_KEY_ICON_RIGHT[] =
 {
 // width height ncolors chars_per_pixel 
 "13 13 2 1",
@@ -212,7 +212,7 @@
 "......##.....",
 };
 
-static char *KDL_KEY_ICON_LEFT[] =
+static const char *KDL_KEY_ICON_LEFT[] =
 {
 // width height ncolors chars_per_pixel 
 "13 13 2 1",
@@ -235,7 +235,7 @@
 ".....##......",
 };
 
-static char *KDL_KEY_ICON_HOME[] =
+static const char *KDL_KEY_ICON_HOME[] =
 {
 // width height ncolors chars_per_pixel 
 "11 13 2 1",
@@ -258,7 +258,7 @@
 "...........",
 };
 
-static char *KDL_KEY_ICON_END[] =
+static const char *KDL_KEY_ICON_END[] =
 {
 // width height ncolors chars_per_pixel 
 "11 13 2 1",
@@ -281,7 +281,7 @@
 "...........",
 };
 
-static char *KDL_KEY_ICON_PAGEUP[] =
+static const char *KDL_KEY_ICON_PAGEUP[] =
 {
 // width height ncolors chars_per_pixel 
 "12 13 2 1",
@@ -304,7 +304,7 @@
 ".....##.....",
 };
 
-static char *KDL_KEY_ICON_PAGEDOWN[] =
+static const char *KDL_KEY_ICON_PAGEDOWN[] =
 {
 // width height ncolors chars_per_pixel 
 "12 13 2 1",
@@ -328,7 +328,7 @@
 };
 
 /*
-static char *KDL_KEY_ICON_CAPSLOCK[] =
+static const char *KDL_KEY_ICON_CAPSLOCK[] =
 {
 // width height ncolors chars_per_pixel 
 "13 13 2 1",
@@ -352,7 +352,7 @@
 };
 */
 
-static char *KDL_KEY_ICON_BACKSPACE[] =
+static const char *KDL_KEY_ICON_BACKSPACE[] =
 {
 // width height ncolors chars_per_pixel 
 "19 13 2 1",
@@ -375,7 +375,7 @@
 ".....##############",
 };
 
-static char *KDL_KEY_ICON_DELETE[] =
+static const char *KDL_KEY_ICON_DELETE[] =
 {
 // width height ncolors chars_per_pixel 
 "19 13 2 1",
@@ -398,7 +398,7 @@
 "##############.....",
 };
 
-static char *KDL_KEY_ICON_TAB[] =
+static const char *KDL_KEY_ICON_TAB[] =
 {
 // width height ncolors chars_per_pixel 
 "17 13 2 1",
@@ -421,7 +421,7 @@
 "........##.....##",
 };
 
-static char *KDL_KEY_ICON_KP[] =
+static const char *KDL_KEY_ICON_KP[] =
 {
 // width height ncolors chars_per_pixel 
 "4 13 2 1",
--- a/kodilib/src/tools/KDisplayTools.cpp
+++ b/kodilib/src/tools/KDisplayTools.cpp
@@ -38,7 +38,7 @@
 };
 
 // --------------------------------------------------------------------------------------------------------
-int kDisplayXPMIcon ( char ** xpmData, const KPosition & pos )
+int kDisplayXPMIcon ( const char ** xpmData, const KPosition & pos )
 {
     glPushAttrib(GL_PIXEL_MODE_BIT);
     
@@ -49,7 +49,7 @@
     glPixelTransferf(GL_GREEN_SCALE, color[1]);
     glPixelTransferf(GL_BLUE_SCALE, color[2]);
     
-    SDL_Surface * xpmSurface = IMG_ReadXPMFromArray (xpmData);
+    SDL_Surface * xpmSurface = IMG_ReadXPMFromArray (const_cast<char **>(xpmData));
     if (xpmSurface == NULL) 
     {
         KConsole::printError("kDisplayXPMIcon: IMG_ReadXPMFromArray failed");
--- a/kodilib/src/tools/KDisplayTools.h
+++ b/kodilib/src/tools/KDisplayTools.h
@@ -15,7 +15,7 @@
 
 void 		kDisplayString		( const std::string &, const KPosition &, bool = true );
 void 		kDisplayString		( const std::string &, const KVector &, void * );
-int		kDisplayXPMIcon		( char ** xpmData, const KPosition & pos );
+int		kDisplayXPMIcon		( const char ** xpmData, const KPosition & pos );
 void		kDisplayWireSphere	( float radius = 0.5, int subdivisions = 8);
 void		kDisplaySolidSphere	( float radius = 0.5, int subdivisions = 8);
 void		kDisplaySolidCube	( float sidelength = 1.0);
--- a/kodilib/src/widgets/KButtonSymbols.h
+++ b/kodilib/src/widgets/KButtonSymbols.h
@@ -6,7 +6,7 @@
 #ifndef __KButtonSymbols
 #define __KButtonSymbols
 
-static char *KDS_BUTTONICON_CLEAR[] =
+static const char *KDS_BUTTONICON_CLEAR[] =
 {
 // width height ncolors chars_per_pixel 
 "13 13 1 1",
@@ -28,7 +28,7 @@
 ".............",
 };
 
-static char *KDS_BUTTONICON_CROSS[] =
+static const char *KDS_BUTTONICON_CROSS[] =
 {
 // width height ncolors chars_per_pixel 
 "13 13 2 1",
@@ -51,7 +51,7 @@
 "#...........#",
 };
 
-static char *KDS_BUTTONICON_UP[] =
+static const char *KDS_BUTTONICON_UP[] =
 {
 // width height ncolors chars_per_pixel 
 "13 13 2 1",
@@ -74,7 +74,7 @@
 ".............",
 };
 
-static char *KDS_BUTTONICON_DOWN[] =
+static const char *KDS_BUTTONICON_DOWN[] =
 {
 // width height ncolors chars_per_pixel 
 "13 13 2 1",
@@ -97,7 +97,7 @@
 ".............",
 };
 
-static char *KDS_BUTTONICON_ARROW_RIGHT[] =
+static const char *KDS_BUTTONICON_ARROW_RIGHT[] =
 {
 // width height ncolors chars_per_pixel 
 "13 13 2 1",
@@ -120,7 +120,7 @@
 ".............",
 };
 
-static char *KDS_BUTTONICON_ARROW_LEFT[] =
+static const char *KDS_BUTTONICON_ARROW_LEFT[] =
 {
 // width height ncolors chars_per_pixel 
 "13 13 2 1",
@@ -143,7 +143,7 @@
 ".............",
 };
 
-static char *KDS_BUTTONICON_ARROW_UP[] =
+static const char *KDS_BUTTONICON_ARROW_UP[] =
 {
 // width height ncolors chars_per_pixel 
 "13 13 2 1",
@@ -166,7 +166,7 @@
 ".............",
 };
 
-static char *KDS_BUTTONICON_ARROW_DOWN[] =
+static const char *KDS_BUTTONICON_ARROW_DOWN[] =
 {
 // width height ncolors chars_per_pixel 
 "13 13 2 1",
@@ -189,7 +189,7 @@
 ".............",
 };
 
-static char *KDS_BUTTONICON_TOP[] =
+static const char *KDS_BUTTONICON_TOP[] =
 {
 // width height ncolors chars_per_pixel 
 "13 13 2 1",
@@ -212,7 +212,7 @@
 ".............",
 };
 
-static char *KDS_BUTTONICON_BOTTOM[] =
+static const char *KDS_BUTTONICON_BOTTOM[] =
 {
 // width height ncolors chars_per_pixel 
 "13 13 2 1",
@@ -235,7 +235,7 @@
 ".............",
 };
 
-static char *KDS_BUTTONICON_DOUBLE_UP[] =
+static const char *KDS_BUTTONICON_DOUBLE_UP[] =
 {
 // width height ncolors chars_per_pixel 
 "13 13 2 1",
@@ -258,7 +258,7 @@
 ".............",
 };
 
-static char *KDS_BUTTONICON_DOUBLE_DOWN[] =
+static const char *KDS_BUTTONICON_DOUBLE_DOWN[] =
 {
 // width height ncolors chars_per_pixel 
 "13 13 2 1",
--- a/src/base/KikiPyAction.cpp
+++ b/src/base/KikiPyAction.cpp
@@ -44,8 +44,9 @@
     }
     else if (PyInstance_Check(python_object))
     {
-        result = PyObject_CallMethod (python_object, "performAction", "sf", action_name.c_str(),
-                                                                            getRelativeTime());
+        result = PyObject_CallMethod (python_object, const_cast<char*>("performAction"),
+                                                     const_cast<char*>("sf"),
+                                                     action_name.c_str(), getRelativeTime());
     }
     if (result)
     {
@@ -63,7 +64,7 @@
 {
     if (PyObject_TypeCheck(python_object, &PyInstance_Type))
     {
-        if (PyObject_CallMethod(python_object, "finishAction", "s", action_name.c_str()) == NULL)
+        if (PyObject_CallMethod(python_object, const_cast<char*>("finishAction"), const_cast<char*>("s"), action_name.c_str()) == NULL)
         {
             KConsole::printError("KikiPyAction::finish failed");
         }
@@ -75,7 +76,7 @@
 { 
     if (PyObject_TypeCheck(python_object, &PyInstance_Type))
     {
-        if (PyObject_CallMethod(python_object, "actionFinished", "s", action_name.c_str()) == NULL)
+        if (PyObject_CallMethod(python_object, const_cast<char*>("actionFinished"), const_cast<char*>("s"), action_name.c_str()) == NULL)
         {
             KConsole::printError("KikiPyAction::finished failed");
         }
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009