Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reallocarray: eliminate compilation warnings (iovisor#3798)
there are compile warnings below for klockstat. ```bash CC klockstat.o klockstat.c: In function ‘print_stats’: klockstat.c:396:12: warning: implicit declaration of function ‘reallocarray’; did you mean ‘realloc’? [-Wimplicit-function-declaration] stats = reallocarray(stats, stats_sz, sizeof(void *)); ^~~~~~~~~~~~ realloc klockstat.c:396:10: warning: assignment to ‘struct stack_stat **’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] stats = reallocarray(stats, stats_sz, sizeof(void *)); ^ BINARY klockstat ``` Defining _GNU_SOURCE fixed the problem.
- Loading branch information