Task #112574 - fixed.err
back to task #112574download
Error: GCC_ANALYZER_WARNING (CWE-686):
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:123:38: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘int *’ but received ‘long unsigned int’ for variadic argument 1 of ‘args’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:698:12: enter_function: entry to ‘do_dump’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:705:14: call_function: calling ‘setup_dump_socket’ from ‘do_dump’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:705:14: return_function: returning to ‘do_dump’ from ‘setup_dump_socket’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:706:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:711:17: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:713:12: branch_false: following ‘false’ branch (when ‘<unknown> == 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:713:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:729:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:732:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:737:12: branch_false: following ‘false’ branch (when ‘rv >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:742:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:749:13: branch_false: following ‘false’ branch (when the strings are non-equal)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:752:17: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:752:17: call_function: calling ‘format_info’ from ‘do_dump’
# 121| * read an int (%d)
# 122| */
# 123|-> int *dest = va_arg(args, int *);
# 124|
# 125| if (sscanf(in, "%d%n", dest, &n) == 1) {
Error: GCC_ANALYZER_WARNING (CWE-686):
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:137:47: warning[-Wanalyzer-va-arg-type-mismatch]: ‘va_arg’ expected ‘unsigned int *’ but received ‘long unsigned int’ for variadic argument 1 of ‘args’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:698:12: enter_function: entry to ‘do_dump’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:705:14: call_function: calling ‘setup_dump_socket’ from ‘do_dump’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:705:14: return_function: returning to ‘do_dump’ from ‘setup_dump_socket’
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:706:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:711:17: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:713:12: branch_false: following ‘false’ branch (when ‘<unknown> == 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:713:12: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:729:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:732:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:737:12: branch_false: following ‘false’ branch (when ‘rv >= 0’)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:742:9: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:749:13: branch_false: following ‘false’ branch (when the strings are non-equal)...
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:752:17: branch_false: ...to here
LVM2.2.03.38/daemons/lvmlockd/lvmlockctl.c:752:17: call_function: calling ‘format_info’ from ‘do_dump’
# 135| * read an unsigned int (%u)
# 136| */
# 137|-> unsigned int *dest = va_arg(args, unsigned int *);
# 138|
# 139| if (sscanf(in, "%u%n", dest, &n) == 1) {
Error: COMPILER_WARNING:
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c: scope_hint: In function ‘clear_locks’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:2548:13: warning[-Wunused-but-set-variable=]: variable ‘lk_count’ set but not used
# 2548 | int lk_count = 0;
# | ^~~~~~~~
# 2546| uint32_t lk_version;
# 2547| uint32_t r_version;
# 2548|-> int lk_count = 0;
# 2549| int rv;
# 2550|
Error: COMPILER_WARNING:
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c: scope_hint: In function ‘lockspace_thread_main’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:3374:9: warning[-Wstringop-truncation]: ‘strncpy’ specified bound 65 equals destination size
# 3374 | strncpy(tmp_name+4, ls->name, sizeof(tmp_name)-4);
# | ^
# 3372| memset(tmp_name, 0, sizeof(tmp_name));
# 3373| memcpy(tmp_name, "REM:", 4);
# 3374|-> strncpy(tmp_name+4, ls->name, sizeof(tmp_name)-4);
# 3375| memcpy(ls->name, tmp_name, sizeof(ls->name));
# 3376| pthread_mutex_unlock(&lockspaces_mutex);
Error: COMPILER_WARNING:
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c: scope_hint: In function ‘worker_thread_main’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-core.c:7072:17: warning[-Wstringop-truncation]: ‘strncpy’ output may be truncated copying 64 bytes from a string of length 64
# 7072 | strncpy(msg.ls_name, ls_name, MAX_NAME);
# | ^
# 7070|
# 7071| if (act->op == LD_OP_FENCE) {
# 7072|-> strncpy(msg.ls_name, ls_name, MAX_NAME);
# 7073| msg.type = HELPER_COMMAND;
# 7074| msg.act = LD_OP_FENCE;
Error: COMPILER_WARNING:
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c: scope_hint: In function ‘lm_init_vg_sanlock’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:723:13: warning[-Wunused-but-set-variable=]: variable ‘i’ set but not used
# 723 | int i, rv;
# | ^
# 721| int align_size = 0;
# 722| int align_mb = 0;
# 723|-> int i, rv;
# 724|
# 725| if (other_args && (lockd_lockargs_get_user_flags(other_args, &lock_args_flags) < 0)) {
Error: COMPILER_WARNING:
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c: scope_hint: In function ‘lm_rename_vg_sanlock’
LVM2.2.03.38/daemons/lvmlockd/lvmlockd-sanlock.c:1108:13: warning[-Wunused-but-set-variable=]: variable ‘i’ set but not used
# 1108 | int i, rv;
# | ^
# 1106| int sector_size = 0;
# 1107| int align_size = 0;
# 1108|-> int i, rv;
# 1109|
# 1110| memset(&disk, 0, sizeof(disk));
Error: COMPILER_WARNING:
LVM2.2.03.38/lib/activate/dev_manager.c: scope_hint: In function ‘add_areas_line’
LVM2.2.03.38/lib/activate/dev_manager.c:3031:18: warning[-Wunused-but-set-variable=]: variable ‘num_existing_areas’ set but not used
# 3031 | unsigned num_existing_areas = 0;
# | ^~~~~~~~~~~~~~~~~~
# 3029| const char *name;
# 3030| unsigned num_error_areas = 0;
# 3031|-> unsigned num_existing_areas = 0;
# 3032|
# 3033| for (s = start_area; s < areas; s++) {
Error: COMPILER_WARNING:
LVM2.2.03.38/lib/device/persist.c: scope_hint: In function ‘persist_start_extend’
LVM2.2.03.38/lib/device/persist.c:2323:13: warning[-Wunused-but-set-variable=]: variable ‘y’ set but not used
# 2323 | int y = 0;
# | ^
# 2321| int errors = 0;
# 2322| int found = 0;
# 2323|-> int y = 0;
# 2324| int n = 0;
# 2325|
Error: COMPILER_WARNING:
LVM2.2.03.38/lib/metadata/integrity_manip.c:535:38: warning[-Wunused-but-set-variable=]: variable ‘lbs_unknown’ set but not used
# 535 | int lbs_4k = 0, lbs_512 = 0, lbs_unknown = 0;
# | ^~~~~~~~~~~
# 533| uint32_t area_count, s;
# 534| uint32_t revert_meta_lvs = 0;
# 535|-> int lbs_4k = 0, lbs_512 = 0, lbs_unknown = 0;
# 536| int pbs_4k = 0, pbs_512 = 0, pbs_unknown = 0;
# 537| int is_active;
Error: COMPILER_WARNING:
LVM2.2.03.38/lib/metadata/integrity_manip.c: scope_hint: In function ‘lv_add_integrity_to_raid’
LVM2.2.03.38/lib/metadata/integrity_manip.c:536:38: warning[-Wunused-but-set-variable=]: variable ‘pbs_unknown’ set but not used
# 536 | int pbs_4k = 0, pbs_512 = 0, pbs_unknown = 0;
# | ^~~~~~~~~~~
# 534| uint32_t revert_meta_lvs = 0;
# 535| int lbs_4k = 0, lbs_512 = 0, lbs_unknown = 0;
# 536|-> int pbs_4k = 0, pbs_512 = 0, pbs_unknown = 0;
# 537| int is_active;
# 538| int r;
Error: GCC_ANALYZER_WARNING (CWE-121):
LVM2.2.03.38/lib/metadata/mirror.c:1739:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
LVM2.2.03.38/lib/metadata/mirror.c:1876:5: enter_function: entry to ‘add_mirror_log’
LVM2.2.03.38/lib/metadata/mirror.c:1896:12: branch_false: following ‘false’ branch (when ‘old_log_count != log_count’)...
LVM2.2.03.38/lib/metadata/mirror.c:1903:12: branch_false: ...to here
LVM2.2.03.38/lib/metadata/mirror.c:1912:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/metadata/mirror.c:1915:25: branch_false: ...to here
LVM2.2.03.38/lib/metadata/mirror.c:1915:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/metadata/mirror.c:1918:13: branch_false: ...to here
LVM2.2.03.38/lib/metadata/mirror.c:1926:12: branch_false: following ‘false’ branch...
LVM2.2.03.38/lib/metadata/mirror.c:1934:12: branch_false: ...to here
LVM2.2.03.38/lib/metadata/mirror.c:1934:12: branch_true: following ‘true’ branch (when ‘old_log_count != 0’)...
LVM2.2.03.38/lib/metadata/mirror.c:1936:22: branch_true: ...to here
LVM2.2.03.38/lib/metadata/mirror.c:1936:22: call_function: calling ‘_form_mirror’ from ‘add_mirror_log’
# 1737| */
# 1738| img_lvs = alloca(sizeof(*img_lvs) * (mirrors + 1));
# 1739|-> memset(img_lvs, 0, sizeof(*img_lvs) * mirrors);
# 1740|
# 1741| if (!_create_mimage_lvs(ah, mirrors, stripes, stripe_size, lv, img_lvs, log))
Error: COMPILER_WARNING:
LVM2.2.03.38/lib/metadata/raid_manip.c: scope_hint: In function ‘_reorder_raid10_near_seg_areas’
LVM2.2.03.38/lib/metadata/raid_manip.c:769:18: warning[-Wunused-but-set-variable=]: variable ‘i’ set but not used
# 769 | unsigned i = 0;
# | ^
# 767| uint32_t data_copies = seg->data_copies;
# 768| uint32_t *idx, stripes = seg->area_count;
# 769|-> unsigned i = 0;
# 770|
# 771| if (!stripes) {
Error: COMPILER_WARNING:
LVM2.2.03.38/libdm/libdm-stats.c: scope_hint: In function ‘_stats_group_tag_len’
LVM2.2.03.38/libdm/libdm-stats.c:1867:17: warning[-Wunused-but-set-variable=]: variable ‘nr_regions’ set but not used
# 1867 | int64_t nr_regions = 0;
# | ^~~~~~~~~~
# 1865| {
# 1866| int i, j, next;
# 1867|-> int64_t nr_regions = 0;
# 1868| size_t buflen = 0, id_len = 0;
# 1869|
Error: COMPILER_WARNING:
LVM2.2.03.38/tools/lvconvert.c:6043:13: warning[-Wunused-but-set-variable=]: variable ‘lbs_unknown’ set but not used
# 6043 | int lbs_unknown = 0, lbs_4k = 0, lbs_512 = 0;
# | ^~~~~~~~~~~
# 6041| uint32_t block_size_setting = 0;
# 6042| uint32_t block_size = 0;
# 6043|-> int lbs_unknown = 0, lbs_4k = 0, lbs_512 = 0;
# 6044| int pbs_unknown = 0, pbs_4k = 0, pbs_512 = 0;
# 6045| int rv = 0;
Error: COMPILER_WARNING:
LVM2.2.03.38/tools/lvconvert.c:6044:13: warning[-Wunused-but-set-variable=]: variable ‘pbs_unknown’ set but not used
# 6044 | int pbs_unknown = 0, pbs_4k = 0, pbs_512 = 0;
# | ^~~~~~~~~~~
# 6042| uint32_t block_size = 0;
# 6043| int lbs_unknown = 0, lbs_4k = 0, lbs_512 = 0;
# 6044|-> int pbs_unknown = 0, pbs_4k = 0, pbs_512 = 0;
# 6045| int rv = 0;
# 6046|
Error: COMPILER_WARNING:
LVM2.2.03.38/tools/lvconvert.c: scope_hint: In function ‘_set_writecache_block_size’
LVM2.2.03.38/tools/lvconvert.c:6044:42: warning[-Wunused-but-set-variable=]: variable ‘pbs_512’ set but not used
# 6044 | int pbs_unknown = 0, pbs_4k = 0, pbs_512 = 0;
# | ^~~~~~~
# 6042| uint32_t block_size = 0;
# 6043| int lbs_unknown = 0, lbs_4k = 0, lbs_512 = 0;
# 6044|-> int pbs_unknown = 0, pbs_4k = 0, pbs_512 = 0;
# 6045| int rv = 0;
# 6046|