Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang-14 build-time-warnings in Compress::Raw::* #21542

Open
jkeenan opened this issue Oct 4, 2023 · 0 comments
Open

clang-14 build-time-warnings in Compress::Raw::* #21542

jkeenan opened this issue Oct 4, 2023 · 0 comments
Labels
build-time-warnings Replaces [META] Build-time warnings RT #133556

Comments

@jkeenan
Copy link
Contributor

jkeenan commented Oct 4, 2023

The following 3 build-time warnings were generated using clang-14 as the compiler. This data is from Ubuntu Linux 22.04 LTS, but I've got similar from FreeBSD-13. These warnings were originally reported by @pmqs in #21288, but since that ticket was originally focused on warnings from locale.c which have now been cleared up, we've closed that ticket and moved the remaining warnings (which must be cleared up upstream on CPAN first) to this new ticket.

$ parse-build-warnings 7011724240.linux.unthreaded.clang-14.maketp.output.txt.gz File:  7011724240.linux.unthreaded.clang-14.maketp.output.txt.gz

[
  {
    char   => 17,
    group  => "Wunused-but-set-variable",
    line   => 376,
    source => "Bzip2.xs",
    text   => "variable 'flags' set but not used",
  },
  {
    char   => 11,
    group  => "Wunused-but-set-variable",
    line   => 765,
    source => "blocksort.c",
    text   => "variable 'numQSorted' set but not used",
  },
  {
    char   => 30,
    group  => "Wunused-but-set-variable",
    line   => 247,
    source => "compress.c",
    text   => "variable 'totc' set but not used",
  },
]

Output from make test_prep:

make[1]: Entering directory '/home/jkeenan/gitwork/perl/cpan/Compress-Raw-Bzip2'
Running Mkbootstrap for Bzip2 ()
chmod 644 "Bzip2.bs"
/home/jkeenan/gitwork/perl/cpan/Compress-Raw-Bzip2/../../miniperl "-I../../lib" -MExtUtils::Command::MM -e 'cp_nonempty' -- Bzip2.bs ../../lib/auto/Compress/Raw/Bzip2/Bzip2.bs 644
"../../miniperl" "-I../../lib" "../../lib/ExtUtils/xsubpp"  -typemap '/home/jkeenan/gitwork/perl/cpan/Compress-Raw-Bzip2/../../lib/ExtUtils/typemap' -typemap '/home/jkeenan/gitwork/perl/cpan/Compress-Raw-Bzip2/typemap'  Bzip2.xs > Bzip2.xsc
mv Bzip2.xsc Bzip2.c
clang-14 -c  -I. -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Werror=pointer-arith -Werror=vla -Wextra -Wno-long-long -Wno-declaration-after-statement -Wc++-compat -Wwrite-strings -O2   -DVERSION=\"2.206\" -DXS_VERSION=\"2.206\" -fPIC "-I../.."  -DBZ_NO_STDIO  Bzip2.c
Bzip2.xs:376:17: warning: variable 'flags' set but not used [-Wunused-but-set-variable]
            int flags = 0 ;
                ^
1 warning generated.
clang-14 -c  -I. -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Werror=pointer-arith -Werror=vla -Wextra -Wno-long-long -Wno-declaration-after-statement -Wc++-compat -Wwrite-strings -O2   -DVERSION=\"2.206\" -DXS_VERSION=\"2.206\" -fPIC "-I../.."  -DBZ_NO_STDIO  blocksort.c
blocksort.c:765:11: warning: variable 'numQSorted' set but not used [-Wunused-but-set-variable]
   Int32  numQSorted;
          ^
1 warning generated.
clang-14 -c  -I. -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Werror=pointer-arith -Werror=vla -Wextra -Wno-long-long -Wno-declaration-after-statement -Wc++-compat -Wwrite-strings -O2   -DVERSION=\"2.206\" -DXS_VERSION=\"2.206\" -fPIC "-I../.."  -DBZ_NO_STDIO  bzlib.c
clang-14 -c  -I. -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Werror=pointer-arith -Werror=vla -Wextra -Wno-long-long -Wno-declaration-after-statement -Wc++-compat -Wwrite-strings -O2   -DVERSION=\"2.206\" -DXS_VERSION=\"2.206\" -fPIC "-I../.."  -DBZ_NO_STDIO  compress.c
compress.c:247:30: warning: variable 'totc' set but not used [-Wunused-but-set-variable]
   Int32 v, t, i, j, gs, ge, totc, bt, bc, iter;
                             ^
1 warning generated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-time-warnings Replaces [META] Build-time warnings RT #133556
Projects
None yet
Development

No branches or pull requests

1 participant