Closed ghalliday closed 4 years ago
gcc 9 generates the following without this change:
.../azure-storage-cpp/Microsoft.WindowsAzure.Storage/src/util.cpp: In function ‘utility::string_t azure::storage::core::convert_to_string_with_fixed_length_fractional_seconds(utility::datetime)’:
.../azure-storage-cpp/Microsoft.WindowsAzure.Storage/src/util.cpp:399:49: warning: ‘%s’ directive output may be truncated writing up to 8 bytes into a region of size between 1 and 65 [-Wformat-truncation=]
399 | snprintf(output, sizeof(output), "%s%sZ", datetime_str, buf);
| ^~ ~~~
.../azure-storage-cpp/Microsoft.WindowsAzure.Storage/src/util.cpp:399:21: note: ‘snprintf’ output between 2 and 74 bytes into a destination of size 65
399 | snprintf(output, sizeof(output), "%s%sZ", datetime_str, buf);
Hi @ghalliday , thanks for your contribution. I just removed this function in my working branch https://github.com/JinmingHu-MSFT/azure-storage-cpp/commit/f6d64f3c93b5913a602ebc4ad257a1f690175f6e, so it won't persist in the next release.
Closing since function will be going away.
Signed-off-by: Gavin Halliday gavin.halliday@lexisnexis.com