Skip to content
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

Unused macro, misleading comments regarding sscanf #130

Open
dan-so opened this issue Dec 2, 2019 · 0 comments
Open

Unused macro, misleading comments regarding sscanf #130

dan-so opened this issue Dec 2, 2019 · 0 comments

Comments

@dan-so
Copy link
Contributor

dan-so commented Dec 2, 2019

Commit 96150ba removed all calls to sscanf, but it's still referenced in a comment here:
https://github.com/kgabis/parson/blob/master/parson.c#L594

I don't know how much (if any) of this comment is still accurate.

This same commit added the line
#define sscanf THINK_TWICE_ABOUT_USING_SSCANF

This is a logical way to prevent use of this function, but recent compilers will warn about unused macros (and often this warning is enabled by -Wall or -Wextra).

I propose either of these fixes to remove this warning:

  • explicitly pass -Wno-unused-macros to gcc
  • remove the macro from the source file and pass -D sscanf=THINK_TWICE_ABOUT_USING_SSCANF to gcc
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

No branches or pull requests

1 participant