Bug? in mapscript/php
Yewondwossen Assefa
assefa at DMSOLUTIONS.CA
Tue Dec 20 16:04:36 EST 2005
Hi There,
Thanks for reportin the bug.. I fixed it in cvs and It should be
available in the 4.8 release
(http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1584).
Later,
José Luis Campanello wrote:
>Hi all!
>
>The compilation of mapscript/php generates the following warning:
>
>php_mapscript.c: In function `php3_ms_img_saveImage':
>php_mapscript.c:5997: warning: `tmp' might be used uninitialized in this function
>
>It seems that it is realy a bug rather than a warning, as the code goes something like:
>
> { /* no filename - stdout */
> int size=0;
> int b;
> FILE *tmp; // ************* HERE SHOULD BE FILE *tmp = NULL;
> .......
> .......
> .......
> .......
> if (pImagepath)
> {
> nBufSize = (strlen(pImagepath)) + strlen(PHPMS_G(tmpId)) + 30;
> pBuf = (char*)emalloc(nBufSize);
> nTmpCount = ++(PHPMS_G(tmpCount));
> sprintf(pBuf, "%s%s%d.svg",
> pImagepath, PHPMS_G(tmpId), nTmpCount);
> tmp = fopen(pBuf, "w");
> }
> //tmp = tmpfile();
> if (tmp == NULL) // ************ HERE tmp MAY NOT BE INITIALIZED (line 6035)
> {
> _phpms_report_mapserver_error(E_WARNING);
> php3_error(E_ERROR, "Unable to open temporary file for SVG output.");
> retVal = -1;
> }
>
>Greetings,
>
> Jose Luis
>
>
--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst
Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/
Phone: (613) 565-5056 (ext 14)
Fax: (613) 565-0925
----------------------------------------------------------------
More information about the mapserver-dev
mailing list