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

When built with GNU, with -Wall, new warnings appear #85

Closed
edwardhartnett opened this issue Oct 13, 2021 · 0 comments · Fixed by #86
Closed

When built with GNU, with -Wall, new warnings appear #85

edwardhartnett opened this issue Oct 13, 2021 · 0 comments · Fixed by #86
Assignees
Labels
warning Warning-free code is required

Comments

@edwardhartnett
Copy link
Contributor

edwardhartnett commented Oct 13, 2021

me/ed/NCEPLIBS-bacio/b/tests && /usr/bin/gfortran  -I/home/ed/NCEPLIBS-bacio/b/src/include_4 -Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -fsanitize=address -g -c /home/ed/NCEPLIBS-bacio/tests/test_bacio2.f90 -o CMakeFiles/test_bacio2.dir/test_bacio2.f90.o
/home/ed/NCEPLIBS-bacio/tests/test_bacio2.f90:12:34:

   12 |   character (len = 8) :: data_in_2
      |                                  1
Warning: Unused variable ‘data_in_2’ declared at (1) [-Wunused-variable]
/home/ed/NCEPLIBS-bacio/tests/test_bacio2.f90:13:35:

   13 |   character (len = 12) :: data_in_3
      |                                   1
Warning: Unused variable ‘data_in_3’ declared at (1) [-Wunused-variable]
/home/ed/NCEPLIBS-bacio/tests/test_bacio2.f90:16:14:

   16 |   integer :: i
      |              1
Warning: Unused variable ‘i’ declared at (1) [-Wunused-variable]
/home/ed/NCEPLIBS-bacio/tests/test_bacio2.f90:19:29:

   19 |   integer(kind=8) :: ka8, ib8, nb8, lu8
      |                             1
Warning: Unused variable ‘ib8’ declared at (1) [-Wunused-variable]
/home/ed/NCEPLIBS-bacio/tests/test_bacio2.f90:19:39:

   19 |   integer(kind=8) :: ka8, ib8, nb8, lu8
      |                                       1
Warning: Unused variable ‘lu8’ declared at (1) [-Wunused-variable]
/home/ed/NCEPLIBS-bacio/tests/test_bacio2.f90:19:34:

   19 |   integer(kind=8) :: ka8, ib8, nb8, lu8
      |                                  1
Warning: Unused variable ‘nb8’ declared at (1) [-Wunused-variable]
/home/ed/NCEPLIBS-bacio/tests/test_bacio2.f90:10:33:

   10 |   character (len = 4) :: new_data
      |                                 1
Warning: Unused variable ‘new_data’ declared at (1) [-Wunused-variable]

and

[ 52%] Building Fortran object tests/CMakeFiles/test_bacio.dir/test_bacio.f90.o
cd /home/ed/NCEPLIBS-bacio/b/tests && /usr/bin/gfortran  -I/home/ed/NCEPLIBS-bacio/b/src/include_4 -Wall -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -fsanitize=address -g -c /home/ed/NCEPLIBS-bacio/tests/test_bacio.f90 -o CMakeFiles/test_bacio.dir/test_bacio.f90.o
/home/ed/NCEPLIBS-bacio/tests/test_bacio.f90:16:39:

   16 |   integer(kind=8) :: ka8, ib8, nb8, lu8
      |                                       1
Warning: Unused variable ‘lu8’ declared at (1) [-Wunused-variable]

and

/home/ed/NCEPLIBS-bacio/tests/test_byteswap.c: In function ‘main’:
/home/ed/NCEPLIBS-bacio/tests/test_byteswap.c:66:13: warning: unused variable ‘ret’ [-Wunused-variable]
   66 |         int ret;
      |             ^~~

and

cd /home/ed/NCEPLIBS-bacio/b/tests && /usr/bin/cc  -I/home/ed/NCEPLIBS-bacio/src -I/home/ed/NCEPLIBS-bacio/b/src/include_4 -g -fprofile-abs-path -fprofile-arcs -ftest-coverage -O0 -fsanitize=address -Wall -g -MD -MT tests/CMakeFiles/test_bacio_c.dir/test_bacio_c.c.o -MF CMakeFiles/test_bacio_c.dir/test_bacio_c.c.o.d -o CMakeFiles/test_bacio_c.dir/test_bacio_c.c.o -c /home/ed/NCEPLIBS-bacio/tests/test_bacio_c.c
/home/ed/NCEPLIBS-bacio/tests/test_bacio_c.c: In function ‘main’:
/home/ed/NCEPLIBS-bacio/tests/test_bacio_c.c:38:13: warning: unused variable ‘i’ [-Wunused-variable]
   38 |         int i;
      |             ^
/home/ed/NCEPLIBS-bacio/tests/test_bacio_c.c:37:36: warning: variable ‘bad_namelen’ set but not used [-Wunused-but-set-variable]
   37 |         int  namelen, datanamelen, bad_namelen;
      |                                    ^~~~~~~~~~~
/home/ed/NCEPLIBS-bacio/tests/test_bacio_c.c:165:13: warning: unused variable ‘i’ [-Wunused-variable]
  165 |         int i;
      |             ^
/home/ed/NCEPLIBS-bacio/tests/test_bacio_c.c:159:13: warning: unused variable ‘bad_start’ [-Wunused-variable]
  159 |         int bad_start = 100;
      |             ^~~~~~~~~
/home/ed/NCEPLIBS-bacio/tests/test_bacio_c.c:326:9: warning: "/*" within comment [-Wcomment]
  326 |         /* mode = BAOPEN_RONLY; */
      |          
/home/ed/NCEPLIBS-bacio/tests/test_bacio_c.c:274:13: warning: unused variable ‘i’ [-Wunused-variable]
  274 |         int i;
      |             ^
/home/ed/NCEPLIBS-bacio/tests/test_bacio_c.c:273:36: warning: variable ‘bad_namelen’ set but not used [-Wunused-but-set-variable]
  273 |         int  namelen, datanamelen, bad_namelen;
      |                                    ^~~~~~~~~~~
/home/ed/NCEPLIBS-bacio/tests/test_bacio_c.c:398:13: warning: unused variable ‘i’ [-Wunused-variable]
  398 |         int i;
      |             ^
/home/ed/NCEPLIBS-bacio/tests/test_bacio_c.c:391:18: warning: unused variable ‘bad_start’ [-Wunused-variable]
  391 |         long int bad_start = 100;
      |                  ^~~~~~~~~

@edwardhartnett edwardhartnett added the warning Warning-free code is required label Oct 13, 2021
@edwardhartnett edwardhartnett self-assigned this Oct 13, 2021
@edwardhartnett edwardhartnett changed the title When run with -Wall, new warnings appear When built with GNU, with -Wall, new warnings appear Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
warning Warning-free code is required
Projects
None yet
1 participant