diff Objects/floatobject.c @ 745:c7b23cc8cded legacy-trunk

answer lint's complaints
author Guido van Rossum <guido@python.org>
date Fri, 27 Mar 1992 17:28:44 +0000
parents 0c1938f2e0c0
children 0cd197947d81
line wrap: on
line diff
--- a/Objects/floatobject.c	Fri Mar 27 17:28:26 1992 +0000
+++ b/Objects/floatobject.c	Fri Mar 27 17:28:44 1992 +0000
@@ -64,6 +64,13 @@
 	return (object *) op;
 }
 
+void
+float_dealloc(op)
+	object *op;
+{
+	DEL(op);
+}
+
 double
 getfloatvalue(op)
 	object *op;
@@ -106,11 +113,12 @@
 	}
 }
 
+/* ARGSUSED */
 static int
 float_print(v, fp, flags)
 	floatobject *v;
 	FILE *fp;
-	int flags;
+	int flags; /* Not used but required by interface */
 {
 	char buf[100];
 	float_buf_repr(buf, v);
@@ -178,7 +186,7 @@
 	floatobject *w;
 {
 	double vx, wx;
-	double div, mod;
+	double /* div, */ mod;
 	wx = w->ob_fval;
 	if (wx == 0.0) {
 		err_setstr(ZeroDivisionError, "float modulo");
@@ -186,10 +194,10 @@
 	}
 	vx = v->ob_fval;
 	mod = fmod(vx, wx);
-	div = (vx - mod) / wx;
+	/* div = (vx - mod) / wx; */
 	if (wx*mod < 0) {
 		mod += wx;
-		div -= 1.0;
+		/* div -= 1.0; */
 	}
 	return newfloatobject(mod);
 }
@@ -317,7 +325,7 @@
 	"float",
 	sizeof(floatobject),
 	0,
-	free,			/*tp_dealloc*/
+	float_dealloc,		/*tp_dealloc*/
 	float_print,		/*tp_print*/
 	0,			/*tp_getattr*/
 	0,			/*tp_setattr*/