benchmark/src
Chris Lalancette 07578d82e0
Shrink the tz_offset size to 41. (#1110)
When building with gcc TSan on, and in Debug mode, we see a warning
like:

benchmark/src/timers.cc: In function ‘std::string benchmark::LocalDateTimeString()’:
src/timers.cc:241:15: warning: ‘char* strncat(char*, const char*, size_t)’ output may be truncated copying 108 bytes from a string of length 127 [-Wstringop-truncation]
  241 |   std::strncat(storage, tz_offset, sizeof(storage) - timestamp_len - 1);
      |   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

While this is essentially a false positive (we never expect
the number of bytes in tz_offset to be too large), the compiler can't
actually tell that.  Shrink the size of tz_offset to a smaller, but still safe
size to eliminate this warning.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
2021-04-09 17:32:00 +01:00
..
arraysize.h Apply clang-format to all headers and source (#303) 2016-10-07 11:35:03 -07:00
benchmark_api_internal.cc Iteration counts should be uint64_t globally. (#817) 2019-05-13 12:33:11 +03:00
benchmark_api_internal.h Iteration counts should be uint64_t globally. (#817) 2019-05-13 12:33:11 +03:00
benchmark_main.cc Add benchmark_main target. (#601) 2018-05-25 11:18:58 +01:00
benchmark_name.cc BENCHMARK_CAPTURE() and Complexity() - naming problem (#761) 2019-03-17 16:38:51 +03:00
benchmark_register.cc Implement custom benchmark name (#1107) 2021-03-30 16:43:03 +03:00
benchmark_register.h Fix Range when starting at zero (#1073) 2020-11-26 11:12:45 +00:00
benchmark_runner.cc Fix type conversion warnings. (#951) 2020-04-06 13:52:09 +01:00
benchmark_runner.h [NFC] Refactor RunBenchmark() (#690) 2018-10-01 17:51:08 +03:00
benchmark.cc Fix typo in invalid file name error message. (#1094) 2021-02-22 09:55:07 +00:00
check.h (clang-)format all the things (#610) 2018-06-01 11:14:19 +01:00
CMakeLists.txt Revert "Add d postfix to Debug libraries (#923)" 2020-03-16 14:29:27 +03:00
colorprint.cc [benchmark] Lowercase windows specific includes (#679) 2018-09-18 09:42:20 +01:00
colorprint.h Apply clang-format to all headers and source (#303) 2016-10-07 11:35:03 -07:00
commandlineflags.cc Remove "BENCHMARK_" prefix from env var version of command line flags (#997) 2020-08-18 10:02:20 +01:00
commandlineflags.h Read options from environment (#881) (#883) 2019-10-23 11:07:08 +03:00
complexity.cc Iteration counts should be uint64_t globally. (#817) 2019-05-13 12:33:11 +03:00
complexity.h Drop Stat1, refactor statistics to be user-providable, add median. (#428) 2017-08-23 16:44:29 -07:00
console_reporter.cc Custom user counters: add invert modifier. (#850) 2019-08-12 17:47:46 +03:00
counter.cc Custom user counters: add invert modifier. (#850) 2019-08-12 17:47:46 +03:00
counter.h update header guard to match style 2019-11-25 13:05:13 +00:00
csv_reporter.cc escape special chars in csv and json output. (#802) 2019-04-19 18:47:25 +01:00
cycleclock.h - add support for Elbrus 2000 (e2k) (#1091) 2021-02-14 17:45:57 +03:00
internal_macros.h Add support for z/OS XL compiler inline asm syntax (#1063) 2020-10-21 16:39:54 +01:00
json_reporter.cc JSONReporter: don't report on scaling if we didn't get it (#1005) (#1008) 2020-07-28 12:46:07 +01:00
log.h (clang-)format all the things (#610) 2018-06-01 11:14:19 +01:00
mutex.h Fix typo in mutex.h (#917) 2019-12-15 13:38:54 +03:00
re.h (clang-)format all the things (#610) 2018-06-01 11:14:19 +01:00
reporter.cc JSONReporter: don't report on scaling if we didn't get it (#1005) (#1008) 2020-07-28 12:46:07 +01:00
sleep.cc Nanosleep workaround for z/OS in sleep.cc (#1067) 2020-10-29 08:49:02 +00:00
sleep.h Replace int64_t usages with 'int' instead. (#359) 2017-03-27 18:32:12 -06:00
statistics.cc Use IterationCount in one more place 2019-05-13 22:42:18 +03:00
statistics.h Drop Stat1, refactor statistics to be user-providable, add median. (#428) 2017-08-23 16:44:29 -07:00
string_util.cc Add missing <cerrno> header include - fixes Android build (#960) 2020-04-23 14:19:19 +03:00
string_util.h escape special chars in csv and json output. (#802) 2019-04-19 18:47:25 +01:00
sysinfo.cc Add support for DragonFly BSD (#1058) 2020-10-12 23:41:49 +03:00
thread_manager.h Make some functions const (#832) 2019-06-26 09:06:24 +01:00
thread_timer.h Make some functions const (#832) 2019-06-26 09:06:24 +01:00
timers.cc Shrink the tz_offset size to 41. (#1110) 2021-04-09 17:32:00 +01:00
timers.h Make PauseTiming() and ResumeTiming() per thread. (#286) 2016-09-02 21:34:34 -06:00