Error: GCC_ANALYZER_WARNING (CWE-686): [#def1] 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): [#def2] 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: [#def3] 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: [#def4] 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: [#def5] 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: [#def6] 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: [#def7] 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: [#def8] 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: [#def9] 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: [#def10] 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: [#def11] 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): [#def12] 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: [#def13] 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: [#def14] 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: [#def15] 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: [#def16] 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: [#def17] 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|
| analyzer-version-clippy | 1.95.0 |
| analyzer-version-cppcheck | 2.20.0 |
| analyzer-version-gcc | 16.0.1 |
| analyzer-version-gcc-analyzer | 16.0.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.95.0 |
| diffbase-analyzer-version-cppcheck | 2.20.0 |
| diffbase-analyzer-version-gcc | 16.0.1 |
| diffbase-analyzer-version-gcc-analyzer | 16.0.1 |
| diffbase-analyzer-version-shellcheck | 0.11.0 |
| diffbase-analyzer-version-unicontrol | 0.0.2 |
| diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| diffbase-exit-code | 0 |
| diffbase-host | ip-172-16-1-98.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20260420.180315.gd39a405.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | lvm2-2.03.40-1.fc45 |
| diffbase-store-results-to | /tmp/tmpgfragzaa/lvm2-2.03.40-1.fc45.tar.xz |
| diffbase-time-created | 2026-04-28 18:14:57 |
| diffbase-time-finished | 2026-04-28 18:19:11 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,shellcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpgfragzaa/lvm2-2.03.40-1.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpgfragzaa/lvm2-2.03.40-1.fc45.src.rpm' |
| diffbase-tool-version | csmock-3.8.5-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-98.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20260420.180315.gd39a405.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | lvm2-2.03.38-2.fc44 |
| store-results-to | /tmp/tmpfc0tudg6/lvm2-2.03.38-2.fc44.tar.xz |
| time-created | 2026-04-28 18:07:35 |
| time-finished | 2026-04-28 18:12:22 |
| title | Fixed findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,shellcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpfc0tudg6/lvm2-2.03.38-2.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpfc0tudg6/lvm2-2.03.38-2.fc44.src.rpm' |
| tool-version | csmock-3.8.5-1.el9 |