From 8ff6f3e895066ebf9f97106248fc0013be6b23ab Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Fri, 6 Dec 2013 00:20:00 +0100 Subject: Issue #19296: Silence compiler warning in dbm_open. Some dbm header files declare the first argument as char * instead of a const char *. --- Misc/NEWS | 2 ++ Modules/_dbmmodule.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Misc/NEWS b/Misc/NEWS index 1522379..90e0dce 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -18,6 +18,8 @@ Core and Builtins Library ------- +- Issue #19296: Silence compiler warning in dbm_open + - Issue #19839: Fix regression in bz2 module's handling of non-bzip2 data at EOF, and analogous bug in lzma module. diff --git a/Modules/_dbmmodule.c b/Modules/_dbmmodule.c index 10f8fb9..f9a0e5e 100644 --- a/Modules/_dbmmodule.c +++ b/Modules/_dbmmodule.c @@ -66,7 +66,8 @@ newdbmobject(const char *file, int flags, int mode) if (dp == NULL) return NULL; dp->di_size = -1; - if ( (dp->di_dbm = dbm_open(file, flags, mode)) == 0 ) { + /* See issue #19296 */ + if ( (dp->di_dbm = dbm_open((char *)file, flags, mode)) == 0 ) { PyErr_SetFromErrno(DbmError); Py_DECREF(dp); return NULL; -- cgit v0.12