-
Notifications
You must be signed in to change notification settings - Fork 262
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
Replaced ancient K&R function declarations to be C23 compatible #2801
Conversation
@WardF @DennisHeimbigner The codebase has a lot of old K&R function declarations. I thought it would just be just a few, so I started fixing them, but I soon realized there were many. So I stopped to share what I started, so it can be discussed. Is it just historical cruft that there are so many? This syntax is no longer compiles with C23. |
The code where this is occurring is indeed very old; from the first incarnations of the netcdf-c library. |
@DennisHeimbigner ok so I can proceed to fixing them all? Assuming so, one question: where do you prefer I move comments related to a specific variable, like this case for void
del_att (test, varid, iatt) /* delete attribute iatt in the netcdf test */
struct netcdf *test;
int varid; /* variable id */
struct cdfatt *iatt; should it end up like this maybe? /* delete attribute iatt in the netcdf test */
void
del_att (struct netcdf *test,
int varid, /* variable id */
struct cdfatt *iatt) |
@DennisHeimbigner @WardF any preference about those comment placements? |
7c9a15d
to
3dbc0da
Compare
Another option, if you don't mind setting up doxygen, would be: /** delete attribute iatt in the netcdf test
*
* \param varid variable id
*/
void
del_att (struct netcdf *test, int varid, att *iatt) It looks like adding /** delete attribute iatt in the netcdf test */
void
del_att(struct netcdf *test,
int varid /**< variable id */,
att *iatt) combines doxygen with the second style above |
6b13eb4
to
f66ca06
Compare
@DWesl almost all the affected files are test files... not sure using doxygen makes sense there...? |
No particular preference; Doxygen would be great (even in test files), but the lack of doxygen wouldn't prevent adoption of a PR. Thanks! We're focused on working through the backlog, and making good progress. |
OK, this is done then IMHO. |
Thanks for this! |
No description provided.