attractivechaos / klib

A standalone and lightweight C library
http://attractivechaos.github.io/klib/
MIT License
4.18k stars 556 forks source link

Prevent constant strings warning in ketopt.h by g++ #175

Open galaxy001 opened 11 months ago

galaxy001 commented 11 months ago

ko_longopt_t.name should be char const *. When used in cpp, g++ will warn ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] on every ko_longopt_t.name.