perl-Time-HiRes-1.9777-510.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/HiRes.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-562): [#def2]
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/HiRes.xs:1528: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1526|           fakeop.op_flags = GIMME_V == G_LIST ? OPf_WANT_LIST :
# 1527|               GIMME_V == G_SCALAR ? OPf_WANT_SCALAR : OPf_WANT_VOID;
# 1528|->         PL_op = &fakeop;
# 1529|           (void)fakeop.op_ppaddr(aTHX);
# 1530|           SPAGAIN;

Error: CPPCHECK_WARNING: [#def3]
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/tmp32.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def4]
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/tmp32.c: scope_hint: In function ‘main’
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/tmp32.c:7:13: warning[-Wunused-variable]: unused variable ‘tictoc’
#    7 |     clock_t tictoc;
#      |             ^~~~~~

Error: COMPILER_WARNING (CWE-457): [#def5]
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/tmp32.c:9:12: warning[-Wmaybe-uninitialized]: ‘ts1’ may be used uninitialized
#    9 |     ret1 = futimens(0, ts1);
#      |            ^~~~~~~~~~~~~~~~
/usr/lib64/perl5/CORE/perl.h:1785: included_from: Included from here.
/usr/include/sys/stat.h:452:12: note: by argument 2 of type ‘const struct timespec[2]’ to ‘futimens’ declared here
#  452 | extern int futimens (int __fd, const struct timespec __times[2]) __THROW;
#      |            ^~~~~~~~
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/tmp32.c:8:21: note: ‘ts1’ declared here
#    8 |     struct timespec ts1[2], ts2[2];
#      |                     ^~~

Error: COMPILER_WARNING (CWE-252): [#def6]
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/tmp32.c: scope_hint: In function ‘main’
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/tmp32.c:11:5: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   11 |     read(0, buf, 0); /* Assuming reading nothing updates atime (the [0]) */
#      |     ^~~~~~~~~~~~~~~

Error: COMPILER_WARNING (CWE-457): [#def7]
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/tmp32.c:12:12: warning[-Wmaybe-uninitialized]: ‘ts1’ may be used uninitialized
#   12 |     ret1 = utimensat(AT_FDCWD, "/dev/stdin", ts1, 0);
#      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib64/perl5/CORE/perl.h:1785: included_from: Included from here.
/usr/include/sys/stat.h:433:12: note: by argument 3 of type ‘const struct timespec[2]’ to ‘utimensat’ declared here
#  433 | extern int utimensat (int __fd, const char *__path,
#      |            ^~~~~~~~~
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/tmp32.c:9:21: note: ‘ts1’ declared here
#    9 |     struct timespec ts1[2], ts2[2];
#      |                     ^~~

Error: GCC_ANALYZER_WARNING (CWE-457): [#def8]
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/tmp32.c: scope_hint: In function ‘main’
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/tmp32.c:13:38: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ts1[0].tv_nsec’

Error: CLANG_WARNING: [#def9]
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/tmp32.c:13:47: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value

Error: COMPILER_WARNING (CWE-252): [#def10]
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/tmp32.c: scope_hint: In function ‘main’
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/tmp32.c:14:5: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#   14 |     read(0, buf, 0); /* Assuming reading nothing updates atime (the [0]) */
#      |     ^~~~~~~~~~~~~~~

Error: COMPILER_WARNING (CWE-563): [#def11]
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/tmp32.c:16:17: warning[-Wunused-but-set-variable]: variable ‘st’ set but not used
#   16 |     struct stat st;
#      |                 ^~

Error: GCC_ANALYZER_WARNING (CWE-457): [#def12]
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/tmp32.c: scope_hint: In function ‘main’
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/tmp32.c:16:38: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ts1[0].tv_nsec’

Error: CLANG_WARNING: [#def13]
perl-Time-HiRes-1.9777-build/Time-HiRes-1.9764/tmp32.c:16:47: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-101.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-nameperl-Time-HiRes-1.9777-510.fc41
store-results-to/tmp/tmp4r0eupa7/perl-Time-HiRes-1.9777-510.fc41.tar.xz
time-created2024-07-03 16:52:19
time-finished2024-07-03 16:53:24
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp4r0eupa7/perl-Time-HiRes-1.9777-510.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp4r0eupa7/perl-Time-HiRes-1.9777-510.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9