NOAA-EMC / NCEPLIBS-g2

Utilities for coding/decoding GRIB2 messages.
Other
6 stars 15 forks source link

unused argument warning in reduce.f #586

Closed edwardhartnett closed 6 months ago

edwardhartnett commented 10 months ago

We have:

/home/ed/NCEPLIBS-g2/src/reduce.f:42:30:

   42 |       SUBROUTINE REDUCE(KFILDO,JMIN,JMAX,LBIT,NOV,LX,NDG,IBIT,JBIT,KBIT,
      |                              1
Warning: Unused dummy argument ‘kfildo’ at (1) [-Wunused-dummy-argument]

When I look in reduce.f I see:

!> @param[in] KFILDO unit number for output/print file.

and later, all the KFILDO code is commented out.

C***                  WRITE(KFILDO,135)L,NOV(L),NOVL,M,J,IBXX2(J)
C*** 135              FORMAT(/' AT 135--L,NOV(L),NOVL,M,J,IBXX2(J)',6I10)               

The subroutine reduce() is called by the pack_gp() subroutine which is some pretty hairy code. It also has a KFILDO parameter, also all commented out; the only remaining use is in the reduce() call, so if I take it out of there, it will just move this warning up to pack_pg() and also change the API.

edwardhartnett commented 6 months ago

OK, I have removed the parameters from both functions.