SuperDARN / rst

Radar Software Toolkit (RST)
https://superdarn.github.io/rst/
GNU General Public License v3.0
22 stars 18 forks source link

Fixing typo in IDL AACGM DLM #562

Closed egthomas closed 1 year ago

egthomas commented 1 year ago

This pull request fixes a small typo in the IDL DLM implementation of AACGM_v2_GetDateTime that causes the following compilation warning:

aacgmdlm.c: In function ‘IDLAACGM_v2_GetDateTime’:
aacgmdlm.c:240:14: warning: ISO C forbids zero-size array ‘outargv’ [-Wpedantic]
   240 |     IDL_VPTR outargv[0];
       |              ^~~~~~~
 aacgmdlm.c:272:5: warning: array subscript 0 is outside array bounds of ‘IDL_VARIABLE *[0]’ {aka ‘IDL_VARIABLE *[]’}     [-Warray-bounds]
   272 |     IDL_StoreScalar(outargv[0],IDL_TYP_LONG,(IDL_ALLTYPES *) &yr);
       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 aacgmdlm.c:240:14: note: while referencing ‘outargv’
   240 |     IDL_VPTR outargv[0];
       |              ^~~~~~~

On this branch, the code compiles cleanly without any warnings.

ecbland commented 1 year ago

Reproduced the bug on develop, and the fix on this branch works as described. Merging now.