Error: SHELLCHECK_WARNING (CWE-149): [#def1] /usr/sbin/xfs_metadump:23:20: warning[SC2027]: The surrounding quotes actually unquote this. Remove or escape them. # 21| l) DBOPTS=$DBOPTS" -l "$OPTARG" ";; # 22| F) DBOPTS=$DBOPTS" -F";; # 23|-> v) OPTS=$OPTS"-v "$OPTARG" ";; # 24| V) xfs_db -p xfs_metadump -V # 25| status=$? Error: CLANG_WARNING: [#def2] xfsprogs-6.7.0/mdrestore/xfs_mdrestore.c:125:6: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 123| *is_file = false; # 124| # 125|-> if (stat(path, &statbuf) < 0) { # 126| /* ok, assume it's a file and create it */ # 127| open_flags |= O_CREAT; Error: GCC_ANALYZER_WARNING (CWE-688): [#def3] xfsprogs-6.7.0/mdrestore/xfs_mdrestore.c: scope_hint: In function ‘open_device’ xfsprogs-6.7.0/mdrestore/xfs_mdrestore.c:125:13: warning[-Wanalyzer-null-argument]: use of NULL ‘path’ where non-null expected xfsprogs-6.7.0/include/libxfs.h:27: included_from: Included from here. xfsprogs-6.7.0/mdrestore/xfs_mdrestore.c:7: included_from: Included from here. xfsprogs-6.7.0/include/xfs_arch.h:134:31: note: in definition of macro ‘__swab32’ xfsprogs-6.7.0/mdrestore/xfs_mdrestore.c:555:17: note: in expansion of macro ‘be32_to_cpu’ /usr/include/features.h:511: included_from: Included from here. /usr/include/bits/libc-header-start.h:33: included_from: Included from here. /usr/include/stdio.h:28: included_from: Included from here. xfsprogs-6.7.0/include/platform_defs.h:9: included_from: Included from here. xfsprogs-6.7.0/include/libxfs.h:11: included_from: Included from here. /usr/include/sys/stat.h:227:12: note: argument 1 of ‘stat’ must be non-null # 123| *is_file = false; # 124| # 125|-> if (stat(path, &statbuf) < 0) { # 126| /* ok, assume it's a file and create it */ # 127| open_flags |= O_CREAT; Error: CLANG_WARNING: [#def4] xfsprogs-6.7.0/mdrestore/xfs_mdrestore.c:407:6: warning[unix.StdCLibraryFunctions]: The 1st argument to 'fread' is NULL but should not be NULL # 405| len = BBTOB(be32_to_cpu(xme.xme_len)); # 406| # 407|-> if (fread(block_buffer, len, 1, md_fp) != 1) # 408| fatal("error reading from metadump file\n"); # 409| Error: CLANG_WARNING: [#def5] xfsprogs-6.7.0/mdrestore/xfs_mdrestore.c:415:50: warning[core.NullDereference]: Access to field 'sb_inprogress' results in a dereference of a null pointer (loaded from variable 'block_buffer') # 413| fatal("bad magic number for primary superblock\n"); # 414| # 415|-> ((struct xfs_dsb *)block_buffer)->sb_inprogress = 1; # 416| # 417| verify_device_size(ddev_fd, is_data_target_file, sb.sb_dblocks, Error: CLANG_WARNING: [#def6] xfsprogs-6.7.0/mdrestore/xfs_mdrestore.c:461:3: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 459| len = BBTOB(be32_to_cpu(xme.xme_len)); # 460| # 461|-> restore_meta_extent(md_fp, fd, device, block_buffer, offset, # 462| len); # 463|
analyzer-version-clang | 18.1.3 |
analyzer-version-cppcheck | 2.13.0 |
analyzer-version-gcc | 14.0.1 |
analyzer-version-gcc-analyzer | 14.0.1 |
analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-clang | 18.1.3 |
diffbase-analyzer-version-cppcheck | 2.13.0 |
diffbase-analyzer-version-gcc | 14.0.1 |
diffbase-analyzer-version-gcc-analyzer | 14.0.1 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-enabled-plugins | clang, cppcheck, gcc, shellcheck |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-240.us-west-2.compute.internal |
diffbase-mock-config | fedora-41-x86_64 |
diffbase-project-name | xfsprogs-6.5.0-3.fc40 |
diffbase-store-results-to | /tmp/tmp70o3a5o2/xfsprogs-6.5.0-3.fc40.tar.xz |
diffbase-time-created | 2024-04-22 11:20:18 |
diffbase-time-finished | 2024-04-22 11:25:24 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp70o3a5o2/xfsprogs-6.5.0-3.fc40.tar.xz' '--gcc-analyze' '/tmp/tmp70o3a5o2/xfsprogs-6.5.0-3.fc40.src.rpm' |
diffbase-tool-version | csmock-3.5.3-1.el9 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-240.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | xfsprogs-6.7.0-1.fc41 |
store-results-to | /tmp/tmp3bob_r61/xfsprogs-6.7.0-1.fc41.tar.xz |
time-created | 2024-04-22 11:25:41 |
time-finished | 2024-04-22 11:30:15 |
title | Newly introduced defects |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp3bob_r61/xfsprogs-6.7.0-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp3bob_r61/xfsprogs-6.7.0-1.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |