sandialabs / seacas

The Sandia Engineering Analysis Code Access System (SEACAS) is a suite of preprocessing, postprocessing, translation, and utility applications supporting finite element analysis software using the Exodus database file format.
Other
136 stars 79 forks source link

Fix clang -Wstrict-prototypes warnings #290

Closed seanm closed 2 years ago

seanm commented 2 years ago

Clang is considering making the -Wstrict-prototypes warning an error by default, see: https://discourse.llvm.org/t/rfc-enabling-wstrict-prototypes-by-default-in-c/60521

I confess I have not tried building your git master, but building VTK I see -Wstrict-prototypes warnings from this project. (I suppose it's possible VTK's version is older and all such warnings are fixed in your master.)

I don't personally use seacas or that part of VTK, but though I'd at least create this ticket.

gsjaardema commented 2 years ago

There should be no warnings from the exodus library.

There will be warnings from the older chaco and svdi libraries, but those should not be used in vtk.

The zoltan library is used by IOSS which is used by vtk and it seems to have a few missing prototypes, but I think they are only in utitlity code and not in the zoltan library itself. However, building make Zoltan_libs does produce multiple warnings from some include files so I need to verify whether the correct thing is getting built, or whether zoltan need some fixes to the prototypes...

gsjaardema commented 2 years ago

I've fixed the zoltan prototypes, so I think that all the libraries that vtk build would use should be clean with -Wstrict-prototypes enabled.

seanm commented 2 years ago

Hey wow thanks for doing this so quickly!

If you have a CI system, might I suggest enabling -Wstrict-prototypes on it, to keep it forever clean.

gsjaardema commented 2 years ago

Yes, I think my CI has a build or two where it only builds IOSS and exodus; that would be a good build to add the warning to.