Actions
Bug #14225
opencpcgen: clang errors
Start date:
Due date:
% Done:
90%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
Build errors with clang:
/code/illumos-gate/usr/src/lib/libcustr/common/custr.c:195:17: error: comparison of integers of different signs: 'size_t' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare] while (chunksz < len) { ~~~~~~~ ^ ~~~ 1 error generated. cpcgen.c:123:9: error: missing field 'cwhite_human' initializer [-Werror,-Wmissing-field-initializers] { NULL } ^ cpcgen.c:161:44: error: missing field 'cpapi_papi' initializer [-Werror,-Wmissing-field-initializers] { "MEM_INST_RETIRED.STORES" "PAPI_sr_ins" }, ^ cpcgen.c:162:43: error: missing field 'cpapi_papi' initializer [-Werror,-Wmissing-field-initializers] { "MEM_INST_RETIRED.LOADS" "PAPI_ld_ins" }, ^ cpcgen.c:1217:42: error: format specifies type 'int' but the argument has type 'pid_t' (aka 'long') [-Werror,-Wformat] if (asprintf(&tmpname, ".%s.%d", fname, getpid()) == -1) { ~~ ^~~~~~~~ %ld cpcgen.c:1286:42: error: format specifies type 'int' but the argument has type 'pid_t' (aka 'long') [-Werror,-Wformat] if (asprintf(&tmpname, ".%s.%d", fname, getpid()) == -1) { ~~ ^~~~~~~~ %ld cpcgen.c:1625:42: error: format specifies type 'int' but the argument has type 'pid_t' (aka 'long') [-Werror,-Wformat] if (asprintf(&tmpname, ".%s.%d", fname, getpid()) == -1) { ~~ ^~~~~~~~ %ld cpcgen.c:1834:42: error: format specifies type 'int' but the argument has type 'pid_t' (aka 'long') [-Werror,-Wformat] if (asprintf(&tmpname, ".%s.%d", name, getpid()) == -1) { ~~ ^~~~~~~~ %ld 7 errors generated.
Some errors are because of not yet picked up warning suppression, some are otherwise interesting.
Actions