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 vajrasky
Recipients vajrasky
Date 2013-10-19.11:02:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1382180566.13.0.638248121089.issue19296@psf.upfronthosting.co.za>
In-reply-to
Content
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 argument 1 of ‘dbm_open’ discards ‘const’ qualifier from pointer target type [enabled by default]
In file included from /home/sky/Code/python/programming_language/cpython/Modules/_dbmmodule.c:16:0:
/usr/include/ndbm.h:55:14: note: expected ‘char *’ but argument is of type ‘const char *’

I have two ndbm.h.

/usr/include/ndbm.h
/usr/include/gdbm/ndbm.h

Both of them expect char *file not const char *file in dbm_open.

I downloaded the newest GNU database manager from http://www.gnu.org.ua/software/gdbm/download.html (gdbm-1.10.tar.gz). It expects char *file as well in dbm_open.

Attached the patch to silent the compiler warning.

But when I searched 'dbm_open' in search engines or did "man dbm_open", I got:

DBM *dbm_open(const char *file, int open_flags, mode_t file_mode);

So I am not really sure about this. Feel free to close this ticket if it is not valid.
History
Date User Action Args
2013-10-19 11:02:46vajraskysetrecipients: + vajrasky
2013-10-19 11:02:46vajraskysetmessageid: <1382180566.13.0.638248121089.issue19296@psf.upfronthosting.co.za>
2013-10-19 11:02:46vajraskylinkissue19296 messages
2013-10-19 11:02:45vajraskycreate