Language
C++
Compiler
gcc 11.1.0
Options
Warnings
Don't Use Boost
C++11
-pedantic
$ g++ prog.cc -Wall -Wextra -std=c++11 -pedantic
data = 02 AF A1 25 34
data_back = 02AFA12534
Exit Code:
0
Author
anonymous
almost 4 years ago
C++
gcc 11.1.0
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