Skip to content

Fix incomplete declarations to squelch warnings#60

Merged
drsteve merged 1 commit into
drsteve:masterfrom
JeffreyBroll:broll_SHUTUPABOUTSLOPPYPROTOTYPINGAAAAA
Aug 26, 2025
Merged

Fix incomplete declarations to squelch warnings#60
drsteve merged 1 commit into
drsteve:masterfrom
JeffreyBroll:broll_SHUTUPABOUTSLOPPYPROTOTYPINGAAAAA

Conversation

@JeffreyBroll

Copy link
Copy Markdown

There are quite a few warnings of the form
passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
that we can silence now and prevent from graduating into errors with future C.

These seem to be caused by

  • incompletely specifying the Lgm_MagModelInfo's Bfield member, a pointer to a function that we can prototype fully if we first declare the struct (since *Bfield takes two vecs and a magmodelinfo as arguments), and
  • some similar things in libLanlGeoMag/Lgm_B_FromScatteredData.c where we just do the same to remove fussing there

This tests with our CrayPE, my local clang, and my local gcc (although the last one fusses with newer GNU and C standards).

@drsteve
drsteve force-pushed the broll_SHUTUPABOUTSLOPPYPROTOTYPINGAAAAA branch from c92a11d to faf7aad Compare August 26, 2025 20:24
@drsteve drsteve changed the title Made the incomplete declaration whining stop Fix incomplete declarations to squelch warnings Aug 26, 2025
@drsteve
drsteve merged commit af6f89e into drsteve:master Aug 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants