mirror of
https://github.com/fmtlib/fmt.git
synced 2025-12-11 22:20:02 +08:00
Suppress warning about missing noreturn attribute
Adding `[[noreturn]]` to `report_unknown_type` suppresses the Clang/GCC `-Wmissing-noreturn` warning:
Clang outputs:
.../fmt/fmt/format.cc:294:74: warning:
function 'report_unknown_type' could be declared with
attribute 'noreturn' [-Wmissing-noreturn]
...code, const char *type) {
^
GCC outputs:
.../fmt/fmt/format.cc:294:74: warning: function might be candidate for
attribute 'noreturn' [-Wsuggest-attribute=noreturn]
...code, const char *type) {
^
Cherry-picked d16c4d.
|
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| format.cc | ||
| format.h | ||
| ostream.cc | ||
| ostream.h | ||
| posix.cc | ||
| posix.h | ||
| printf.cc | ||
| printf.h | ||
| string.h | ||
| time.h | ||