This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
printf %s, cast appropriately.
authorJarkko Hietaniemi <jhi@iki.fi>
Thu, 29 May 2014 14:34:28 +0000 (10:34 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Thu, 29 May 2014 14:36:08 +0000 (10:36 -0400)
[perl #121881]

Fix for Coverity perl5 CID 29050:
Printf arg type mismatch (PW.PRINTF_ARG_MISMATCH)
printf_arg_mismatch: argument is incompatible with corresponding
format string conversion

ext/NDBM_File/NDBM_File.xs

index 52e60fc..e3adf3f 100644 (file)
@@ -109,7 +109,7 @@ ndbm_STORE(db, key, value, flags = DBM_REPLACE)
            if (RETVAL < 0 && errno == EPERM)
                croak("No write permission to ndbm file");
            croak("ndbm store returned %d, errno %d, key \"%s\"",
-                       RETVAL,errno,key.dptr);
+                  RETVAL, errno, (const char *)key.dptr);
            dbm_clearerr(db->dbp);
        }