[issue19296] Compiler warning when compiling dbm module

2013-12-05 Thread Christian Heimes
Christian Heimes added the comment: You are probably right. Let's not get too fancy with compiler warnings. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker

[issue19296] Compiler warning when compiling dbm module

2013-12-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3068ff3d9d1e by Christian Heimes in branch 'default': Issue #19296: Silence compiler warning in dbm_open. http://hg.python.org/cpython/rev/3068ff3d9d1e -- nosy: +python-dev ___ Python tracker

[issue19296] Compiler warning when compiling dbm module

2013-12-05 Thread Larry Hastings
Larry Hastings added the comment: I suspect dbm_open predates the common availability of "const". I assert we can safely assume it won't overwrite the contents of the buffer. (Barring spectacular memory corruption bugs that "const" would be powerless to prevent.) --

[issue19296] Compiler warning when compiling dbm module

2013-12-05 Thread Christian Heimes
Christian Heimes added the comment: Yes, a cast to char* silences the error. But it could potentially brea contract because dbm_open() could alter the content of the string. I'm just paranoid (again). *g* -- ___ Python tracker

[issue19296] Compiler warning when compiling dbm module

2013-12-05 Thread Larry Hastings
Larry Hastings added the comment: Why wouldn't "dbm_open((char *)file, flags, mode)" work? -- ___ Python tracker ___ ___ Python-bugs-l

[issue19296] Compiler warning when compiling dbm module

2013-12-05 Thread Christian Heimes
Christian Heimes added the comment: Here is a patch that strncpy() the filename to a char[]. -- nosy: +christian.heimes stage: -> needs patch type: -> compile error Added file: http://bugs.python.org/file32993/dbm_const_filename.patch ___ Python tra

[issue19296] Compiler warning when compiling dbm module

2013-11-16 Thread Nick Coghlan
Nick Coghlan added the comment: I get the same warning on Fedora 19. However, the signature of dbmopen_impl is generated by argument clinic, so it isn't simply a matter of patching the signature in place. I'm also inclined to consider the *platform* header to be wrong, since the dbm_open API r

[issue19296] Compiler warning when compiling dbm module

2013-10-19 Thread Vajrasky Kok
New submission from Vajrasky Kok: I got this warning when compiling dbm module with Python 3.4. /home/sky/Code/python/programming_language/cpython/Modules/_dbmmodule.c: In function ‘newdbmobject’: /home/sky/Code/python/programming_language/cpython/Modules/_dbmmodule.c:55:5: warning: passing ar