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

warning: 'sscanf' used to convert a string to a floating-point value, but function will not report conversion errors; consider using 'strtod' instead [cert-err34-c] #872

Open
ClausKlein opened this issue Jul 17, 2024 · 0 comments

Comments

@ClausKlein
Copy link

/usr/local/opt/llvm/bin/clang-tidy -checks=-*,cert-* -p=build /Users/clausklein/Workspace/c/tests/cJSON-src/test.c
4618 warnings generated.
Suppressed 4618 warnings (4618 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
/usr/local/opt/llvm/bin/clang-tidy -checks=-*,cert-* -p=build /Users/clausklein/Workspace/c/tests/cJSON-src/cJSON.c
/Users/clausklein/Workspace/c/tests/cJSON-src/cJSON.c:583:14: warning: 'sscanf' used to convert a string to a floating-point value, but function will not report conversion errors; consider using 'strtod' instead [cert-err34-c]
  583 |         if ((sscanf((char*)number_buffer, "%lg", &test) != 1) || !compare_double((double)test, d))
      |              ^
5033 warnings generated.
Suppressed 5032 warnings (5032 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
bash-5.2$ 
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