Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 4 years ago

Language

C++

Compiler

gcc 11.1.0

Options
Warnings
Don't Use Boost
C++11
-pedantic

Author

anonymous

almost 4 years ago

$ g++ prog.cc -Wall -Wextra -std=c++11 -pedantic
prog.cc: In function 'size_t convert_hex(uint8_t*, size_t, const char*)':
prog.cc:7:53: warning: format '%x' expects argument of type 'unsigned int*', but argument 3 has type 'int*' [-Wformat=]
    7 |     for (i = 0; i < count && sscanf(src + i * 2, "%2x", &value) == 1; i++) {
      |                                                   ~~^   ~~~~~~
      |                                                     |   |
      |                                                     |   int*
      |                                                     unsigned int*
      |                                                   %2x
data = 02 AF A1 25 34
data_back = 02AFA12534
Exit Code:
0