[Gridflow-cvs] [svn] commit: r6158 - in /trunk/src: classes2.cxx gridflow.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Mon Aug 16 17:38:17 EDT 2010


Author: matju
Date: Mon Aug 16 17:38:17 2010
New Revision: 6158

Log:
fix warnings (incl some 64-bit problems)

Modified:
    trunk/src/classes2.cxx
    trunk/src/gridflow.cxx

Modified: trunk/src/classes2.cxx
==============================================================================
--- trunk/src/classes2.cxx (original)
+++ trunk/src/classes2.cxx Mon Aug 16 17:38:17 2010
@@ -144,7 +144,7 @@
 		}
 	}
 	if (argc>int(sargs.size()) && sargs[sargs.size()-1].name!=wildcard)
-		pd_error(canvas,"warning: too many args (got %d, want %d)", argc, sargs.size());
+		pd_error(canvas,"warning: too many args (got %d, want %d)", argc, int(sargs.size()));
 }
 \end class {install("args",1,1);}
 

Modified: trunk/src/gridflow.cxx
==============================================================================
--- trunk/src/gridflow.cxx (original)
+++ trunk/src/gridflow.cxx Mon Aug 16 17:38:17 2010
@@ -134,8 +134,8 @@
 			else if (*s=='*') {s++; n++;}
 		}
 		if (strchr("hlLqjzt",*s)) RAISE("can't use length modifier '%c' in the context of pd",*s);
-		char form[t-s+2]; sprintf(form,"%.*s",s-t+1,t);
-		int k[2];
+		char form[t-s+2]; sprintf(form,"%.*s",int(s-t+1),t);
+		int k[2]={0,0}; // fake initialisation just to shut up gcc warning
 		if (n>0) k[0]=int(EATFLOAT);
 		if (n>1) k[1]=int(EATFLOAT);
 		if (strchr("cdiouxX",*s)) {switch (n) {
@@ -463,7 +463,7 @@
 
 void post_BitPacking(BitPacking *b) {
 	::post("Bitpacking: endian=%d bytes=%d size=%d packer=%d unpacker=%d",
-		b->endian,b->bytes,b->size,b->packer-bp_packers,b->unpacker-bp_unpackers);
+		b->endian,b->bytes,b->size,int(b->packer-bp_packers),int(b->unpacker-bp_unpackers));
 	::post("  mask=[0x%08x,0x%08x,0x%08x,0x%08x]",b->mask[0],b->mask[1],b->mask[2],b->mask[3]);
 }
 



More information about the Gridflow-cvs mailing list