liboqs icon indicating copy to clipboard operation
liboqs copied to clipboard

Adhere to C99

Open baentsch opened this issue 2 years ago • 3 comments

As per this discussion and the feature announcement of clang-15 consider ensuring void parameter lists are declared as such. Impacted code bases: liboqs (some few locations & generated code), Frodo, Bike. All PQClean code seems to be OK.

Alternatively/until decision has been made, drop -Wpedantic build option.

baentsch avatar Apr 27 '22 10:04 baentsch

Do we have any tool at the moment that will identify the code that needs to be changed?

dstebila avatar Apr 27 '22 17:04 dstebila

Clang-15 triggers this. As no distro seems to be carrying this version yet, I built it from source on the "Dev-Chrome" AWS VM (beware if you want to do it yourself: some 4000+ components to build): PATH needs to be set to it and CMAKE_C_COMPILER suitably set to trigger the issues when building liboqs.

baentsch avatar Apr 27 '22 18:04 baentsch

@baentsch

As no distro seems to be carrying this version yet, ...

Alternatively, you could use the docker image I documented a few minutes ago in the issue #1199 to catch all the missing void errors, one at a time if you keep on building, failing, fixing, and building until it is done. I know that sounds very tedious, but it would be just a one-time job.

On the other hand, your fully built clang would serve a broader purpose, of course.

DevelopDaily avatar Apr 28 '22 02:04 DevelopDaily

Closed by #1293. Thanks, @thb-sb !

baentsch avatar Aug 30 '22 09:08 baentsch

You're welcome! 😃

thb-sb avatar Aug 30 '22 09:08 thb-sb