Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldreik committed Jun 14, 2019
1 parent a33b45a commit 1d83a56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/fuzzing/named_arg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void invoke_fmt(const uint8_t* Data, std::size_t Size, unsigned int argsize) {
std::memcpy(argnamebuffer.data(), Data, argsize);
auto argname = fmt::string_view(argnamebuffer.data(), argsize);
#else
auto argname = fmt::string_view((const char*)Data, argsize);
auto argname = fmt::string_view(fmt_fuzzer::as_chars(Data), argsize);
#endif
Data += argsize;
Size -= argsize;
Expand All @@ -44,7 +44,7 @@ void invoke_fmt(const uint8_t* Data, std::size_t Size, unsigned int argsize) {
std::memcpy(fmtstringbuffer.data(), Data, Size);
auto fmtstring = fmt::string_view(fmtstringbuffer.data(), Size);
#else
auto fmtstring = fmt::string_view((const char*)Data, Size);
auto fmtstring = fmt::string_view(fmt_fuzzer::as_chars(Data), Size);
#endif
std::string message = fmt::format(fmtstring, fmt::arg(argname, item1));
}
Expand Down
4 changes: 2 additions & 2 deletions test/fuzzing/one_arg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void invoke_fmt(const uint8_t* Data, std::size_t Size) {
std::memcpy(fmtstringbuffer.data(), Data, Size);
auto fmtstring = fmt::string_view(fmtstringbuffer.data(), Size);
#else
auto fmtstring = fmt::string_view((const char*)Data, Size);
auto fmtstring = fmt::string_view(fmt_fuzzer::as_chars(Data), Size);
#endif

#if FMT_FUZZ_FORMAT_TO_STRING
Expand All @@ -56,7 +56,7 @@ void invoke_fmt_time(const uint8_t* Data, std::size_t Size) {
std::memcpy(fmtstringbuffer.data(), Data, Size);
auto fmtstring = fmt::string_view(fmtstringbuffer.data(), Size);
#else
auto fmtstring = fmt::string_view((const char*)Data, Size);
auto fmtstring = fmt::string_view(fmt_fuzzer::as_chars(Data), Size);
#endif
auto* b = std::localtime(&item);
if (b) {
Expand Down

0 comments on commit 1d83a56

Please sign in to comment.