Unsigned sscanf() in kernel_version()
cppcheck was complaining: [attached_probe.cpp:206]: (warning) %d in format string (no. 1) requires 'int *' but the argument type is 'unsigned int *'. [attached_probe.cpp:206]: (warning) %d in format string (no. 2) requires 'int *' but the argument type is 'unsigned int *'. [attached_probe.cpp:206]: (warning) %d in format string (no. 3) requires 'int *' but the argument type is 'unsigned int *'. While at it, check uname() and sscanf() return values to avoid garbage.
Showing
Please register or sign in to comment