[Python-checkins] r54128 - sandbox/trunk/pep3101/unicodeformat.c

patrick.maupin python-checkins at python.org
Mon Mar 5 01:22:43 CET 2007


Author: patrick.maupin
Date: Mon Mar  5 01:22:42 2007
New Revision: 54128

Modified:
   sandbox/trunk/pep3101/unicodeformat.c
Log:
Removed compiler warnings

Modified: sandbox/trunk/pep3101/unicodeformat.c
==============================================================================
--- sandbox/trunk/pep3101/unicodeformat.c	(original)
+++ sandbox/trunk/pep3101/unicodeformat.c	Mon Mar  5 01:22:42 2007
@@ -992,7 +992,9 @@
 {
     char* p_charbuf;
     Py_ssize_t n_allocated;
+#if C_UNICODE
     CH_TYPE* ptr;
+#endif
     int ok;
     /* XXX len should probably be Py_ssize_t, but that's not how the
        function is declared in stringobject.c */
@@ -1028,9 +1030,6 @@
 format_decimal(PyObject *fieldobj, FmtState *fs,
                const InternalFormatSpec *format)
 {
-    Py_ssize_t width;
-    char* p_abuf;
-    CH_TYPE align = format->align;
     CH_TYPE *p_buf;
     CH_TYPE *p_digits;  /* pointer to the digits we have */
     CH_TYPE n_digits;   /* count of digits we have */
@@ -1038,9 +1037,9 @@
     Py_ssize_t n_lpadding;
     Py_ssize_t n_spadding;
     Py_ssize_t n_rpadding;
-    CH_TYPE lsign;
+    CH_TYPE lsign = 0;
     Py_ssize_t n_lsign = 0;
-    CH_TYPE rsign;
+    CH_TYPE rsign = 0;
     Py_ssize_t n_rsign = 0;
     Py_ssize_t n_total; /* the total length we're going to write */
     Py_ssize_t n_allocated; /* how much space we actually allocated


More information about the Python-checkins mailing list