ni / grpc-device

gRPC server providing remote access to NI device driver APIs.
MIT License
71 stars 50 forks source link

Bubble up Warnings as Errors #1041

Closed strainmike closed 8 months ago

strainmike commented 9 months ago

What does this Pull Request accomplish?

Sets warnings as errors for all source code the project directly owns. Does not affect compiles of codegen'd code or thirdparty code (although pulled in headers can still be problematic). For test code we are additionally ignoring the deprecation of functions like strncpy. This change does not enable any additional warnings, but that can come later.

The vast majority of the code changes are casting size types to uint32_t's. There are better fixes for that sort of thing if wanted, I'm open to suggestions.

Why should this Pull Request be merged?

azdo:2507449

I put -Wall -Werror -Wextra on all my projects. Compilers finding bugs for you is great.

What testing has been done?

Built on Windows (with Visual Studio 2022 though) and Linux. I'll see how the PR build goes.

christag-ni commented 8 months ago

@strainmike Don't have to complete the merge right now, but is there a reason this PR hasn't been completed? Just checking if there's a way I can help.

strainmike commented 8 months ago

@strainmike Don't have to complete the merge right now, but is there a reason this PR hasn't been completed? Just checking if there's a way I can help.

I had been waiting for the PR build to complete. It looks like it finally did so I'll complete it.