[Numpy-svn] r3929 - trunk/numpy/core/src

numpy-svn@scip... numpy-svn@scip...
Sat Jul 28 07:56:07 CDT 2007


Author: pearu
Date: 2007-07-28 07:56:02 -0500 (Sat, 28 Jul 2007)
New Revision: 3929

Modified:
   trunk/numpy/core/src/umathmodule.c.src
Log:
Trying to fix compiler wrarnings, 3.

Modified: trunk/numpy/core/src/umathmodule.c.src
===================================================================
--- trunk/numpy/core/src/umathmodule.c.src	2007-07-28 12:41:40 UTC (rev 3928)
+++ trunk/numpy/core/src/umathmodule.c.src	2007-07-28 12:56:02 UTC (rev 3929)
@@ -1615,7 +1615,7 @@
 	intp is1=steps[0],os=steps[1], n=dimensions[0];
 	char *i1=args[0], *op=args[1];
 	for(i=0; i<n; i++, i1+=is1, op+=os) {
-		*((@typ@ *)op) = - *((@typ@ *)i1);
+		*((@typ@ *)op) = (@typ@) (- *((@typ@ *)i1));
 	}
 }
 /**end repeat**/
@@ -1647,6 +1647,7 @@
 /**begin repeat
 #TYPE=CFLOAT,CDOUBLE,CLONGDOUBLE#
 #typ=cfloat,cdouble,clongdouble#
+#rtyp=float,double,longdouble#
  */
 static void
 @TYPE@_sign(char **args, intp *dimensions, intp *steps, void *func)
@@ -1658,7 +1659,7 @@
 	for(i=0; i<n; i++, i1+=is1, op+=os) {
                 t1 = *((@typ@ *)i1);
 		(*((@typ@ *)op)).real = _SIGNC(t1);
-                (*((@typ@ *)op)).imag = 0;
+                (*((@typ@ *)op)).imag = (@rtyp@)0;
 	}
 }
 /**end repeat**/



More information about the Numpy-svn mailing list