argtable / argtable3

A single-file, ANSI C, command-line parsing library that parses GNU-style command-line options.
http://www.argtable.org
Other
372 stars 65 forks source link

Minor clang-tidy fixes #75

Closed igrr closed 2 years ago

igrr commented 2 years ago

Hi @tomghuang, thank you for maintaining this excellent library!

This small PR fixes two issues reported in esp-idf project by clang-tidy:

  1. String literals were assigned to char* variables instead of const char*. The fix looks pretty straightforward.
  2. Function argument name in declaration and definition of arg_end function was different (maxerrors vs maxcount). I opted to change the name in the header file for smaller number of changes. Let me know if you prefer it the other way around.
tomghuang commented 2 years ago

Hi @igrr , thank you very much for this PR, which really helps to improve the quality of the project. I will try to add -Wwrite-strings to the CMake script. Thanks.

igrr commented 2 years ago

Thanks for the quick review and merge!

By the way, if you still have interest in https://github.com/argtable/argtable3/issues/70 I can open a PR for it.

tomghuang commented 2 years ago

Hi @igrr ,

Yes, I'm very interested in using tools to scan security vulnerabilities in the code base. If you can provide help on #70, that would be great! Thanks!