summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-12-17 21:37:18 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-12-17 21:37:18 (GMT)
commit136ea49b3990d4ed1600be0d042c3676cfcece0f (patch)
tree34edbacb09da6f758dbf8e828082bd20f8654a7f /Modules
parente5b2ac898785ba78a6a81878d77d270fcb5fba61 (diff)
downloadcpython-136ea49b3990d4ed1600be0d042c3676cfcece0f.zip
cpython-136ea49b3990d4ed1600be0d042c3676cfcece0f.tar.gz
cpython-136ea49b3990d4ed1600be0d042c3676cfcece0f.tar.bz2
Issue #10951: Fix a compiler warning in timemodule.c
Diffstat (limited to 'Modules')
-rw-r--r--Modules/timemodule.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 17d9c38..3ab6e9b 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -527,14 +527,18 @@ time_strftime(PyObject *self, PyObject *args)
* 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!