Homec4science

Annotate ColoredPrintf with the format attribute and fix bugs.

Authored by David Benjamin <davidben@google.com> on Dec 22 2016, 02:40.

Description

Annotate ColoredPrintf with the format attribute and fix bugs.

googletest doesn't currently build with clang's very aggressive
-Wformat-nonliteral warning. It requires that all non-literal format
strings come from the argument of a function annotated with a compatible
format attribute.

Fixing that reports that ColoredPrintf's callers weren't passing the
normal -Wformat warning. Some messages were passed directly into the
format string rather than via "%s".

Details

Event Timeline

David Benjamin <davidben@google.com> committed R9484:53c478d639b8: Annotate ColoredPrintf with the format attribute and fix bugs. (authored by David Benjamin <davidben@google.com>).Dec 22 2016, 02:57