[Python-checkins] cpython (3.2): Issue #10951: Fix a compiler warning in timemodule.c

victor.stinner python-checkins at python.org
Sat Dec 17 22:38:28 CET 2011


http://hg.python.org/cpython/rev/d7862e855274
changeset: 74015:d7862e855274
branch: 3.2
parent: 74004:0b86da9d6964
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Sat Dec 17 22:37:18 2011 +0100
summary:
 Issue #10951: Fix a compiler warning in timemodule.c
files:
 Modules/timemodule.c | 4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -527,14 +527,18 @@
 * will be ahead of time...
 */
 for (i = 1024; ; i += i) {
+#if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__)
 int err;
+#endif
 outbuf = (time_char *)PyMem_Malloc(i*sizeof(time_char));
 if (outbuf == NULL) {
 PyErr_NoMemory();
 break;
 }
 buflen = format_time(outbuf, i, fmt, &buf);
+#if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__)
 err = errno;
+#endif
 if (buflen > 0 || i >= 256 * fmtlen) {
 /* If the buffer is 256 times as long as the format,
 it's probably not failing for lack of room!
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /