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

Towards -Wall,-Wpedantic,-Werror #2113

Open
4 of 24 tasks
Rot127 opened this issue Jul 22, 2023 · 5 comments
Open
4 of 24 tasks

Towards -Wall,-Wpedantic,-Werror #2113

Rot127 opened this issue Jul 22, 2023 · 5 comments
Labels
Testing Test related issue
Milestone

Comments

@Rot127
Copy link
Collaborator

Rot127 commented Jul 22, 2023

We had now several times that the CI in Capstone is fine with several build warnings, but external projects are not.

For v6 or at least v7 we should be able to compile CS without any build warnings.
Especially since everything is C and more strict is always better in this case.

  • Builds with -Wall
  • Builds with -Wpedantic (1926 warnings) in
    • ARMDisassembler.c
    • arm.h
    • ARMInstPrinter.c
    • bpf.h
    • capstone.h
    • Mapping.h
    • MCInst.h
    • mips.h
    • ppc.h
    • PPCInstPrinter.c
    • PPCInstPrinter.h
    • riscv.h
    • sh.h
    • sparc.h
    • systemz.h
    • tricore.h
    • TriCoreInstPrinter.c
    • wasm.h
    • xcore.h

Issues

#2139

@XVilka
Copy link
Contributor

XVilka commented Jul 27, 2023

Another possible step would be also adding clang-tidy into the CI, see this for example: https://gitlab.com/OpenMW/openmw/-/merge_requests/900/diffs

@peace-maker
Copy link
Contributor

The same can be done for msvc to get more digital eyes on the code. "Werror" can be enabled as well using "/WX". There aren't that many problems when building with -Wall 2d8dad6 so maybe it's already possible for v6.

@Rot127
Copy link
Collaborator Author

Rot127 commented Sep 12, 2023

Agree. There are some warnings disabled though in code with pragma. Need to remove those as well at some point.

@Rot127
Copy link
Collaborator Author

Rot127 commented Sep 23, 2023

Made a build with -Wall and -Wpedantic. We are not so far from passing -Wall! And Wpedantic seems mostly a problem with our header files. Added a list above.

@XVilka
Copy link
Contributor

XVilka commented Sep 26, 2023

@imbillow could you please check the Tricore warnings when you have time?

@Rot127 Rot127 added the Testing Test related issue label Mar 21, 2024
@Rot127 Rot127 added this to the v6 milestone Mar 21, 2024
@Rot127 Rot127 modified the milestones: v6 - Alpha, v6 - Beta Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing Test related issue
Projects
Status: Todo
Development

No branches or pull requests

3 participants