Snippets for libstatgrab 0.92.2 from Fedora i686
Sourced from https://kojipkgs.fedoraproject.org/packages/libstatgrab/0.92.2/1.fc46/data/logs/i686/build.log.
-
network_stats.c:1281:17: warning: 'strncpy' output may be truncated copying 16 bytes from a string of length 8095 [-Wstringop-truncation] 1281 | strncpy(ifr.ifr_name, name, sizeof ifr.ifr_name); | ^ -
process_stats.c:225:9: warning: 'readdir_r' is deprecated [-Wdeprecated-declarations] 225 | while( ( rc = readdir_r( proc_dir, dir_entry, &result ) ) == 0 ) { | ^~~~~ -
process_stats.c:459:37: warning: pointer 'f_351' may be used after 'fclose' [-Wuse-after-free=] 459 | #define VECTOR_UPDATE_ERROR_CLEANUP fclose(f); | ^~~~~~~~~ -
process_stats.c:459:37: warning: pointer 'f_464' may be used after 'fclose' [-Wuse-after-free=] 459 | #define VECTOR_UPDATE_ERROR_CLEANUP fclose(f); | ^~~~~~~~~ -
vector.c:104:41: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 104 | TRACE_LOG_FMT("vector", "vector for %lu items allocated at %p", round_count, vector); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
vector.c:126:33: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 126 | TRACE_LOG_FMT("vector", "allocating vector fitting for %lu items and use %lu of them", alloc_count, initial_used); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
vector.c:126:33: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 126 | TRACE_LOG_FMT("vector", "allocating vector fitting for %lu items and use %lu of them", alloc_count, initial_used); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
vector.c:141:41: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 141 | TRACE_LOG_FMT("vector", "freeing vector %p containing %lu items", vector, vector->used_count); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
vector.c:154:41: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 154 | TRACE_LOG_FMT("vector", "clearing vector %p containing %lu items", vector, vector->used_count); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
vector.c:176:33: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 176 | TRACE_LOG_FMT("vector", "resizing vector(%p) using %lu items to fit %lu items", vector, vector->used_count, new_count); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
vector.c:176:33: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 176 | TRACE_LOG_FMT("vector", "resizing vector(%p) using %lu items to fit %lu items", vector, vector->used_count, new_count); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
vector.c:206:33: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 206 | TRACE_LOG_FMT("vector", "resized vector(%p) to fit %lu items", vector, round_count); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
vector.c:300:41: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 300 | TRACE_LOG_FMT("vector", "cloned vector containing %lu items", src->used_count); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
vector.c:340:31: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 340 | "computing vector diff between vector containing %lu items (cur) and vector containing %lu items (last)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
vector.c:340:31: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 340 | "computing vector diff between vector containing %lu items (cur) and vector containing %lu items (last)", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
globals.c:376:34: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 376 | TRACE_LOG_FMT("globals", "%lu components initialized", i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
globals.c:102:18: warning: array subscript 'const struct sg_named_mutex[0]' is partly outside array bounds of 'const char[4]' [-Warray-bounds=] 102 | assert( a->name ); | ~^~~~~~ -
statgrab.c:344:25: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-truncation] 344 | strncpy(name_list + pos, name, strlen(name)); | ^ -
saidar.c:394:28: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] 394 | printw("%5lu", stats.user_entries); | ~~~^ ~~~~~~~~~~~~~~~~~~ | | | | | size_t {aka unsigned int} | long unsigned int | %5u -
saidar.c:148:31: warning: ‘%llu’ directive output may be truncated writing between 1 and 17 bytes into a region of size 10 [-Wformat-truncation=] 148 | snprintf(string, 10, "%llu%c", number, type[x]); | ^~~~ -
routines.c:207:34: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] 207 | INFO_LOG_FMT( "testlib", "%s - stats = %p, entries = %lu", NAME_OF(statgrab_test_funcs[func_index],full), stats, entries ); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~