This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients christian.heimes
Date 2017-09-14.17:37:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1505410650.2.0.862260901795.issue31474@psf.upfronthosting.co.za>
In-reply-to
Content
GCC 7.1 shows a bunch onf warnings related to -Wnonnull and -Wint-in-bool-context when compiling Python 2.7:

In file included from Include/Python.h:78:0,
                 from Objects/listobject.c:3:
Objects/listobject.c: In function ‘list_resize’:
Include/pymem.h:110:34: warning: ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool-context]
  (type *) PyMem_REALLOC((p), (n) * sizeof(type)) )
                                  ^
Include/pymem.h:77:21: note: in definition of macro ‘PyMem_REALLOC’
     : realloc((p), (n) ? (n) : 1))
                     ^
Objects/listobject.c:62:9: note: in expansion of macro ‘PyMem_RESIZE’
         PyMem_RESIZE(items, PyObject *, new_allocated);
         ^~~~~~~~~~~~


In file included from Python/formatter_string.c:17:0:
Python/../Objects/stringlib/formatter.h: In function ‘format_float_internal’:
Python/../Objects/stringlib/formatter.h:576:9: warning: argument 2 null where non-null expected [-Wnonnull]
         memmove(buf,
         ^~~~~~~~~~~~
                 prefix,
                 ~~~~~~~
                 spec->n_prefix * sizeof(STRINGLIB_CHAR));
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from Include/Python.h:38:0,
                 from Python/formatter_string.c:6:
/usr/include/string.h:47:14: note: in a call to function ‘memmove’ declared here
 extern void *memmove (void *__dest, const void *__src, size_t __n)
History
Date User Action Args
2017-09-14 17:37:30christian.heimessetrecipients: + christian.heimes
2017-09-14 17:37:30christian.heimessetmessageid: <1505410650.2.0.862260901795.issue31474@psf.upfronthosting.co.za>
2017-09-14 17:37:30christian.heimeslinkissue31474 messages
2017-09-14 17:37:29christian.heimescreate