opencryptoki / libica

Crypto library for s390x.
Other
9 stars 17 forks source link

Tooling cleanup and c99 fixes #103

Closed holger-dengler closed 1 year ago

holger-dengler commented 2 years ago

This RP covers a few tooling cleanups and fixes for c99-findings.

The first patch reworks the ignore patterns for git (.gitignore). With this commit, generated files are no longer displayed in git status after a build. This makes it much easier for a developer to keep track of changed files.

The second patch adds the files to the related clean targets, which are generated by coverage builds. This allows to reset to a clean source tree after coverage builds. This is also an improvement for developers and maybe also for package maintainers.

The third patch fixes c99-related warnings. It does not contain the replacement of the asm keyword (see notes to the next commit).

The last patch in this series enforce c99-related compiler checks for library and test code. This commit uses currently the standard option -std=gnu99, which is AFAIK gcc-specific.

Note: please treat the last patch as a proposal. We should discuss, if we stay with the gnu-specific option or switch to an ISO-style checking with the option -std=c99. If this is the case, there is another aspect we should discuss.

With the ISO-conform option -std=c99, we also have to care about the asm-keyword in the code. With this ISO-c99 option, asm is unknown, so the compiler will exit with an error. There are two possible options to fix the unknown keyword:

Summary of open questions:

holger-dengler commented 2 years ago

Correction: the option -std=gnu99 is not gcc specific, clang also accepts this option. I would propose to continue with std=gnu99 and keep asm as is.

jschmidb commented 1 year ago

There's a little typo in commit msg:

build: remove coverage files in clean target The coverage build (<- build, not builds?) generates files, which should be removed during a clean target. Add the coverage patterns to the CLEANFILES variables.

holger-dengler commented 1 year ago

There's a little typo in commit msg:

fixed in the current version (force-push)