comparison dw.h @ 2210:7677e1083d07

Increase _DW_ENV_STRING_SIZE to 257 bytes, this is the maximum size the utsname fields can be according to the Linux utsname man page. This seems to be a bit excessive but, this will prevent any possible issue on future operating system support. It also eliminates a bogus warning when compiling using gcc 9 and higher, which I believe is this gcc bug: warning: ‘__builtin_strncpy’ output may be truncated copying 64 bytes from a string of length 64 [-Wstringop-truncation] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88780
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 07 Dec 2020 20:01:03 +0000
parents a43a3f80ed32
children 1ec6300a627b
comparison
equal deleted inserted replaced
2209:0b6e1b5c8b5e 2210:7677e1083d07
1401 1401
1402 /* Application ID support lengths */ 1402 /* Application ID support lengths */
1403 #define _DW_APP_ID_SIZE 100 1403 #define _DW_APP_ID_SIZE 100
1404 1404
1405 /* Use at least the linux utsname limit to avoid gcc fortify warnings */ 1405 /* Use at least the linux utsname limit to avoid gcc fortify warnings */
1406 #define _DW_ENV_STRING_SIZE 65 1406 #define _DW_ENV_STRING_SIZE 257
1407 1407
1408 typedef struct _dwenv { 1408 typedef struct _dwenv {
1409 /* Operating System Name and DW Build Date/Time */ 1409 /* Operating System Name and DW Build Date/Time */
1410 char osName[_DW_ENV_STRING_SIZE], buildDate[_DW_ENV_STRING_SIZE], buildTime[_DW_ENV_STRING_SIZE]; 1410 char osName[_DW_ENV_STRING_SIZE], buildDate[_DW_ENV_STRING_SIZE], buildTime[_DW_ENV_STRING_SIZE];
1411 /* Versions and builds */ 1411 /* Versions and builds */