[mapserver-commits] [mapserver/mapserver] 738ea6: mapxbase: simplify fieldname assignment to pszFInf...
GitHub
noreply at github.com
Mon Aug 20 09:27:33 PDT 2018
Branch: refs/heads/branch-7-2
Home: https://github.com/mapserver/mapserver
Commit: 738ea6d45e31c8c6e1f5f2c3a06473b378a66709
https://github.com/mapserver/mapserver/commit/738ea6d45e31c8c6e1f5f2c3a06473b378a66709
Author: Sander Jansen <s.jansen at gmail.com>
Date: 2018-08-20 (Mon, 20 Aug 2018)
Changed paths:
M mapxbase.c
Log Message:
-----------
mapxbase: simplify fieldname assignment to pszFInfo
Commit: 23893139adbe042eb944b7ee62ae7067f1600c8f
https://github.com/mapserver/mapserver/commit/23893139adbe042eb944b7ee62ae7067f1600c8f
Author: Sander Jansen <s.jansen at gmail.com>
Date: 2018-08-20 (Mon, 20 Aug 2018)
Changed paths:
M mapxbase.c
Log Message:
-----------
Simplify msDBFWriteAttribute to get rid of compiler warnings in latest GCC.
Latest GCC shows these warnings when compiling release build:
warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
warning: ‘strncpy’ output may be truncated copying between 0 and 39 bytes from a string of length 39 [-Wstringop-truncation]
warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
In msDBFWriteAttribute we can replace strncpy with memcpy since we already check for the string length and
we don't want the strncpy capability of writing extra \0 characters.
Also replace the 2 snprintf calls (one for the specific format, and one for the value) with a single one.
As snprintf can handle 0 precision numbers just fine, we don't need a separate branch for that either.
NOTE, this does change the rounding for doubles whose field precision is set to 0.
Before 90.9 would be converted to 90, with the new code it would become 91.
Commit: b27976f2dca4958cbe94088d55011c69b1c1b869
https://github.com/mapserver/mapserver/commit/b27976f2dca4958cbe94088d55011c69b1c1b869
Author: Even Rouault <even.rouault at mines-paris.org>
Date: 2018-08-20 (Mon, 20 Aug 2018)
Changed paths:
M mapxbase.c
Log Message:
-----------
Merge pull request #5647 from gogglesguy/mapxbase-simplify-write-attribute
Simplify msDBFWriteAttribute to get rid of compiler warnings
Compare: https://github.com/mapserver/mapserver/compare/c59ab11ca6cf...b27976f2dca4
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
More information about the mapserver-commits
mailing list