Package: qutemol / 0.4.1~cvs20081111-15

19_gifsave.cpp.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From: Morten Kjeldgaard <mok@bioxray.au.dk>
Subject: modification to source code


--- a/src/gifSave.cpp
+++ b/src/gifSave.cpp
@@ -55,7 +55,7 @@
     Frame r(npix),g(npix),b(npix);
   
     // de-interlaeve
-    for (int i=0, j=0; i<npix; i++){
+    for (unsigned int i=0, j=0; i<npix; i++){
     r[i]=data[j++];
     g[i]=data[j++];
     b[i]=data[j++];
@@ -71,7 +71,7 @@
     
   } else {
     // maunal assignment of color indices
-    for (int i = 0, j=0; i < npix; i++) {
+    for (unsigned int i = 0, j=0; i < npix; i++) {
         int minIndex = 0,
             minDist = 3 * 256 * 256;
         GifColorType *c = outputPalette->Colors;
@@ -154,7 +154,7 @@
 
   if (!AddLoop(GifFile)) return false;
 
-  for (int ni=0; ni<frames.size(); ni++) {      
+  for (int ni=0; ni < (int)frames.size(); ni++) {
 
     static unsigned char
     ExtStr[4] = { 0x04, 0x00, 0x00, 0xff };