Author: amoog-guest
Date: 2011-07-10 15:55:35 +0000 (Sun, 10 Jul 2011)
New Revision: 12513

Added:
   packages/trunk/holotz-castle/debian/patches/12_gcc-4.6.patch
Modified:
   packages/trunk/holotz-castle/debian/changelog
   packages/trunk/holotz-castle/debian/patches/02_makefile.patch
   packages/trunk/holotz-castle/debian/patches/series
Log:
* Fix compiler warnings -Wunused-but-set-variable and -Wunused-result
  (Closes: #625353)
  - Add 12_gcc-4.6.patch

Modified: packages/trunk/holotz-castle/debian/changelog
===================================================================
--- packages/trunk/holotz-castle/debian/changelog       2011-07-10 04:19:06 UTC 
(rev 12512)
+++ packages/trunk/holotz-castle/debian/changelog       2011-07-10 15:55:35 UTC 
(rev 12513)
@@ -1,14 +1,18 @@
-holotz-castle (1.3.14-4) unstable; urgency=low
+holotz-castle (1.3.14-4) UNRELEASED; urgency=low
 
-  * Team upload.
-  * Don't build with -Werror as it causes FTBFS with gcc 4.6. (Closes: #625353)
-    - Update 02_makefile.patch
-    - Thanks to Andreas Moog for the patch.
+  * Team upload
+
+  [ Felix Geyer ]
   * Fix FTBFS with ld --as-needed.
     - Update 02_makefile.patch
 
- -- Felix Geyer <[email protected]>  Tue, 24 May 2011 10:21:41 +0200
+  [ Andreas Moog ]
+  * Fix compiler warnings -Wunused-but-set-variable and -Wunused-result
+    (Closes: #625353)
+    - Add 12_gcc-4.6.patch
 
+ -- Andreas Moog <[email protected]>  Sun, 10 Jul 2011 17:43:54 +0200
+
 holotz-castle (1.3.14-3) unstable; urgency=low
 
   * Team upload.

Modified: packages/trunk/holotz-castle/debian/patches/02_makefile.patch
===================================================================
--- packages/trunk/holotz-castle/debian/patches/02_makefile.patch       
2011-07-10 04:19:06 UTC (rev 12512)
+++ packages/trunk/holotz-castle/debian/patches/02_makefile.patch       
2011-07-10 15:55:35 UTC (rev 12513)
@@ -19,7 +19,7 @@
 -CFLAGS=-fno-strict-aliasing -I. -I../JLib `$(SDL_CONFIG) --cflags` 
-I/usr/local/include/ -I/usr/local/include/SDL -O3 -Wall -Werror -Wshadow 
$(CPU_OPTS) -ffast-math -c
 -LDFLAGS=-L. -ffast-math -lSDL_image -lSDL_ttf -lSDL_mixer `$(SDL_CONFIG) 
--libs`
 +MORE_CFLAGS= -O3
-+CFLAGS=-fno-strict-aliasing -I. -I../JLib `$(SDL_CONFIG) --cflags` 
-I/usr/local/include/ -I/usr/local/include/SDL $(MORE_CFLAGS) -Wall -Wshadow 
$(CPU_OPTS) -ffast-math -c
++CFLAGS=-fno-strict-aliasing -I. -I../JLib `$(SDL_CONFIG) --cflags` 
-I/usr/local/include/ -I/usr/local/include/SDL $(MORE_CFLAGS) -Wall -Werror 
-Wshadow $(CPU_OPTS) -ffast-math -c
 +LDFLAGS=-ffast-math
 +LIBS=-L. -lSDL_image -lSDL_ttf -lSDL_mixer `$(SDL_CONFIG) --libs` -lz
  

Added: packages/trunk/holotz-castle/debian/patches/12_gcc-4.6.patch
===================================================================
--- packages/trunk/holotz-castle/debian/patches/12_gcc-4.6.patch                
                (rev 0)
+++ packages/trunk/holotz-castle/debian/patches/12_gcc-4.6.patch        
2011-07-10 15:55:35 UTC (rev 12513)
@@ -0,0 +1,247 @@
+Description: Fix a build failure with -Werror and -Wunused-but-set-variable
+ and -Wunused-result. 
+Author: Andreas Moog <[email protected]>
+Bug-Debian: http://bugs.debian.org/625353
+
+--- holotz-castle-1.3.14.orig/src/HCTheme.cpp
++++ holotz-castle-1.3.14/src/HCTheme.cpp
+@@ -51,7 +51,7 @@ s32 HCTheme::CountDirs()
+       bool cont = true;
+ 
+       char cwd[2048];
+-      getcwd(cwd, 2048);
++      if (0 == getcwd(cwd, 2048)){}
+ 
+       do
+       {
+@@ -103,11 +103,11 @@ bool HCTheme::LoadFloors()
+                               ret = false;
+                       }
+ 
+-                      chdir("..");
++                      if (0 == chdir("..")){}
+               }
+       }
+ 
+-      chdir("..");
++      if (0 == chdir("..")){}
+ 
+   return ret;
+ }
+@@ -170,7 +170,7 @@ bool HCTheme::LoadContFloors()
+                               ret = false;
+                       }
+                       
+-                      chdir("..");
++                      if (0 == chdir("..")){}
+               }
+               else
+               {
+@@ -178,7 +178,7 @@ bool HCTheme::LoadContFloors()
+               }
+       }
+ 
+-      chdir("..");
++      if (0 == chdir("..")){}
+ 
+       return ret;
+ }
+@@ -224,11 +224,11 @@ bool HCTheme::LoadBreaks()
+                               ret = false;
+                       }
+ 
+-                      chdir("..");
++                      if (0 == chdir("..")){}
+               }
+       }
+ 
+-      chdir("..");
++      if (0 == chdir("..")){}
+ 
+   return ret;
+ }
+@@ -266,11 +266,11 @@ bool HCTheme::LoadBars()
+                               ret = false;
+                       }
+ 
+-                      chdir("..");
++                      if (0 == chdir("..")){}
+               }
+       }
+ 
+-      chdir("..");
++      if (0 == chdir("..")){}
+ 
+   return ret;
+ }
+@@ -308,11 +308,11 @@ bool HCTheme::LoadLadders()
+                               ret = false;
+                       }
+                       
+-                      chdir("..");
++                      if (0 == chdir("..")){}
+               }
+       }
+ 
+-      chdir("..");
++      if (0 == chdir("..")){}
+   
+       return ret;
+ }
+@@ -364,11 +364,11 @@ bool HCTheme::LoadObjects()
+                               ret = false;
+                       }
+                       
+-                      chdir("..");
++                      if (0 == chdir("..")){}
+               }
+       }
+ 
+-      chdir("..");
++      if (0 == chdir("..")){}
+ 
+   return ret;
+ }
+@@ -413,11 +413,11 @@ bool HCTheme::LoadRopes()
+                               ret = false;
+                       }
+ 
+-                      chdir("..");
++                      if (0 == chdir("..")){}
+               }
+       }
+ 
+-      chdir("..");
++      if (0 == chdir("..")){}
+ 
+   return ret;
+ }
+@@ -489,11 +489,11 @@ bool HCTheme::LoadChar(const char *direc
+                               }
+                       } // for every state
+                       
+-                      chdir("..");
++                      if (0 == chdir("..")){}
+               } // if chdir()
+       }
+ 
+-      chdir("../..");
++      if (0 == chdir("../..")){}
+ 
+       return true;
+ }
+@@ -559,17 +559,17 @@ bool HCTheme::LoadDialogs()
+                                       
!imgDialog[i-1][HCTDT_RIGHT].Load("right.tga"))
+                       {
+         char strcwd[256];
+-        getcwd(strcwd, 256);
++        if (0 == getcwd(strcwd, 256)){}
+         perror("error");
+                               fprintf(stderr, "HCTheme: Couldn't load dialog. 
%s en dir %s\n", SDL_GetError(), strcwd);
+                               ret = false;
+                       }
+ 
+-                      chdir("..");
++                      if (0 == chdir("..")){}
+               }
+       }
+ 
+-      chdir("..");
++      if (0 == chdir("..")){}
+ 
+   return ret;
+ }
+@@ -620,11 +620,11 @@ bool HCTheme::LoadNarratives()
+                               ret = false;
+                       }
+ 
+-                      chdir("..");
++                      if (0 == chdir("..")){}
+               }
+       }
+ 
+-      chdir("..");
++      if (0 == chdir("..")){}
+ 
+   return ret;
+ }
+@@ -635,7 +635,7 @@ bool HCTheme::Load(const char *themeName
+ 
+       char themeDir[PATH_MAX];
+       char curDir[PATH_MAX];
+-      getcwd(curDir, PATH_MAX);
++      if (0 == getcwd(curDir, PATH_MAX)){}
+       
+       // Checks for the theme in any of:
+       // - installation directory
+@@ -669,12 +669,12 @@ bool HCTheme::Load(const char *themeName
+       {
+               fprintf(stderr, "HCTheme: Couldn't load resources.\n");
+ 
+-              chdir(curDir);
++              if (0 == chdir(curDir)){}
+ 
+               return false;
+       }
+ 
+-      chdir(curDir);
++      if (0 == chdir(curDir)){}
+ 
+       return true;
+ }
+--- holotz-castle-1.3.14.orig/src/HCRope.cpp
++++ holotz-castle-1.3.14/src/HCRope.cpp
+@@ -41,7 +41,6 @@ bool HCRope::Init(float p, s32 a, u32 l,
+       amplitude = abs(a) < length * 
theme.Rope(subtype)[HCRDT_MIDDLE].Height() ? abs(a) : length * 
theme.Rope(subtype)[HCRDT_MIDDLE].Height();
+ 
+       s32 i;
+-      float y;
+ 
+       JDELETE_ARRAY(middle);
+       middle = new JImage [length];
+@@ -52,12 +51,10 @@ bool HCRope::Init(float p, s32 a, u32 l,
+       for (i = 0; i < length; ++i)
+       {
+               middle[i].Ref(theme.Rope(subtype)[HCRDT_MIDDLE]);
+-              y = top.Y() + top.Height() + (i * middle[i].Height());
+               middle[i].Pos(top.X() + (top.Width()/2) - 
(middle[i].Width()/2), pos.y);
+       }
+       
+       edge.Ref(theme.Rope(subtype)[HCRDT_EDGE]);
+-      y = top.Y() + top.Height() + (i * middle[0].Height());
+       edge.Pos(top.X() + (top.Width()/2) - (edge.Width()/2), pos.y);
+ 
+       // 25 fps resolution
+--- holotz-castle-1.3.14.orig/src/HCScript.cpp
++++ holotz-castle-1.3.14/src/HCScript.cpp
+@@ -70,7 +70,7 @@ bool HCScript::Load(const char *filename
+       blocks = new HCScriptBlock[numBlocks];
+       
+       // Process each block
+-      s8 *begin, *end; 
++      s8 *begin;
+ 
+       f.StartOfDocument();
+ 
+@@ -80,7 +80,6 @@ bool HCScript::Load(const char *filename
+               
+               begin = f.GetPos();
+               f.FindNext("}");
+-              end = f.GetPos();
+ 
+               f.SetPos(begin);
+ 
+--- holotz-castle-1.3.14.orig/src/HCLevel.cpp
++++ holotz-castle-1.3.14/src/HCLevel.cpp
+@@ -745,11 +745,8 @@ void HCLevel::Pos(float xPos, float yPos
+       dy = yMap - yMapOrg;
+ 
+       // Now move the objects
+-      float t1, t2;
+       for (s32 i = 0; i < numObjects; ++i)
+       {
+-              t1 = objects[i]->X();
+-              t2 = objects[i]->Y();
+               
+               objects[i]->Pos(objects[i]->X() + (s32)dx, 
+                                                                               
objects[i]->Y() + (s32)dy);

Modified: packages/trunk/holotz-castle/debian/patches/series
===================================================================
--- packages/trunk/holotz-castle/debian/patches/series  2011-07-10 04:19:06 UTC 
(rev 12512)
+++ packages/trunk/holotz-castle/debian/patches/series  2011-07-10 15:55:35 UTC 
(rev 12513)
@@ -9,3 +9,4 @@
 09_gcc-4.3.patch
 10_dont_hardcode_g++41.patch
 11_dirent64.patch
+12_gcc-4.6.patch


_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to