php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18643 libmysql/my_tempnam.c gives compiler warnings
Submitted: 2002-07-30 08:42 UTC Modified: 2002-11-22 04:12 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: nohn@php.net Assigned: georg (profile)
Status: Closed Package: Compile Warning
PHP Version: 4CVS-2002-08-14 OS: Compaq Tru64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nohn@php.net
New email:
PHP Version: OS:

 

 [2002-07-30 08:42 UTC] nohn@php.net
cc: Warning: /usr/users/nohn/php4-200207292100/ext/mysql/libmysql/my_tempnam.c, 
line 99: In this statement, the referenced type of the pointer value "(const cha
r ...)temp_env" is "pointer to const signed char", which is not compatible with 
"pointer to signed char". (ptrmismatch)
    environ=(const char**)temp_env;             /* May give warning */
----^
cc: Warning: /usr/users/nohn/php4-200207292100/ext/mysql/libmysql/my_tempnam.c, 
line 105: In this statement, the referenced type of the pointer value "(const char ...)old_env" is "pointer to const signed char", which is not compatible with 
"pointer to signed char". (ptrmismatch)
  environ=(const char**)old_env;                /* May give warning */
--^

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-13 22:27 UTC] kalowsky@php.net
Sebastian is this still true with georg's recent work?
 [2002-08-14 18:02 UTC] kalowsky@php.net
After chating with georg about this it seems that this bug has been fixed in the MySQL end of things, and we are just awaiting an update from thier end (Zak?).  
 [2002-08-23 11:58 UTC] georg@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 [2002-11-22 01:55 UTC] info at chrisranjana dot com
I downloaded the latest snapshot i.e php4-STABLE-200211220430 today and compliled using the options  

./configure --with-mysql --with-gd=/usr/local --with-png-dir=/downloads/libpng-1.2.5 --with-zlib-dir=/downloads/zlib-1.1.4   --with-apxs=/usr/local/apache/bin/apxs --with-jpeg-dir=/downloads/jpeg-6b --with-mail --enable-track-vars

but still was getting the errors 

ext/mysql/libmysql/my_tempnam.lo: In function `my_tempnam':
/downloads/php4-STABLE-200211220430/ext/mysql/libmysql/my_tempnam.c:103: the use of `tempnam' is dangerous, better use `mkstemp'

then I went to www.mysql.com  and downloaded their latest binary  mysql-3.23.53a-pc-linux-gnu-i686.tar.gz and installed it into /usr/local/mysql

and changed the configure options to 

./configure --with-mysql=/usr/local/mysql --with-gd=/usr/local --with-png-dir=/downloads/libpng-1.2.5 --with-zlib-dir=/downloads/zlib-1.1.4   --with-apxs=/usr/local/apache/bin/apxs --with-jpeg-dir=/downloads/jpeg-6b --with-mail --enable-track-vars


note:- --with-mysql=/usr/local/mysql

and it compiled perfect

chris
http://www.chrisranjana.com
 [2002-11-22 04:12 UTC] jan@php.net
the mysql client library that comes woth PHP uses mkstemp, thus the warning, on the other hand, it is implemented in a completely safe manner as they workaround the possible 'unsafetyness'. The latest mysql client lib (that you dl'd from mysql.com) seems to nuked it alltogether), hence no warning for you there. This is nothing to worry about, never was and won't be. at some point the bundled mysql client lib will be somehow updated and the warning will probably be gone then. Can we please keep that quiet from now on? :)

Jan
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Dec 06 11:05:52 2022 UTC