On Wednesday, July 27, 2011 10:52:57 Bruno Friedmann wrote:
Hi, I'm building a mapserver5 version in
With the latest version which contain security bug fixes I'm now getting a build failed
I: Program returns random data in a function E: mapserver5 no-return-in-nonvoid-function mapogr.cpp:3500
Here the function /************************************************************************/ /* msOGREscapeSQLParam */ /************************************************************************/ char *msOGREscapeSQLParam(layerObj *layer, const char *pszString) { char* pszEscapedStr =NULL; #ifdef USE_OGR if(layer && pszString && strlen(pszString) > 0) { char* pszEscapedOGRStr = CPLEscapeString(pszString, strlen(pszString), CPLES_SQL ); pszEscapedStr = strdup(pszEscapedOGRStr); CPLFree(pszEscapedOGRStr); return pszEscapedStr; }
Insert here a: return NULL or move the return above to this place (has the same effect).
#else /* ------------------------------------------------------------------ * OGR Support not included... * ------------------------------------------------------------------ */
msSetError(MS_MISCERR, "OGR support is not available.", "msOGREscapeSQLParam()"); return NULL;
#endif /* USE_OGR */ }
How can I ride off of the error ? return pszString (string untouched ?)
Previously it returned random data, so I would not return usable data now...
sorry my c/c++ knowledge are very limited.
Andreas -- Andreas Jaeger, Program Manager openSUSE aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org