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

More warnings: Android #309

Closed
geiseri opened this issue Mar 13, 2021 · 4 comments
Closed

More warnings: Android #309

geiseri opened this issue Mar 13, 2021 · 4 comments

Comments

@geiseri
Copy link

geiseri commented Mar 13, 2021

Describe the bug

include/jsoncons/detail/parse_number.hpp:861 and include/jsoncons/detail/parse_number.hpp:874 have errors that length is unused: operator()(const CharT* s, std::size_t length) const. it's odd though because amd64 native compiled just fine, it just seemed clang got in there.

What compiler, architecture, and operating system?

  • Compiler: clang from ndk 21.3.6528147
  • Architecture (e.g. x86, x64) host: x64, target: x86_64-none-linux-android21
  • Operating system: linux

What jsoncons library version?

  • [*] Latest release v0.162.2
@geiseri geiseri added the Bug label Mar 13, 2021
@danielaparker
Copy link
Owner

danielaparker commented Mar 13, 2021

Fixed on master, thanks. Could you check if you can compile master cleanly? I'm compiling using gcc and clang with

-Werror -Wall -Wextra -Wimplicit-fallthrough -Wcast-align -Wcast-qual -Wsign-compare -pedantic

and using PVS Studio locally, but your recently reported warnings weren't picked up.

Thanks,
Daniel

@geiseri
Copy link
Author

geiseri commented Mar 16, 2021

I just tested with master. Something is up. I see the length on those lines have the unused variable, but I have no idea why clang complains and gcc not. Unless somehow that code is dead or something on gcc.

@danielaparker
Copy link
Owner

My apologies, I had neglected to push that branch to master, could you try again?

It's a good question, but there is no difference in code coverage between the gcc and clang builds.

@danielaparker
Copy link
Owner

Actually, that section of code is only used in android builds, so that explains that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants