You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe it's because we have the pedantic flag with gcc, but compiling unit tests against munit I get warnings about discarded qualifiers. This is because I initialize a struct with a const string similar to what's in the example. It doesn't show up in default gcc, so I believe it's one of my stricter compilation flags (likely pedantic).
It's not exactly as simple as changing the type qualifier in the struct to be const char* instead of char* since when I took a brief scan over some of the functions, it looks like there could actually be some modifications to the strings.
Fix should be simply to allocate new strings on the heap and copy/concatenate things over. I'm willing to help out when I can.
The text was updated successfully, but these errors were encountered:
I believe it's because we have the pedantic flag with gcc, but compiling unit tests against munit I get warnings about discarded qualifiers. This is because I initialize a struct with a const string similar to what's in the example. It doesn't show up in default gcc, so I believe it's one of my stricter compilation flags (likely pedantic).
It's not exactly as simple as changing the type qualifier in the struct to be
const char*
instead ofchar*
since when I took a brief scan over some of the functions, it looks like there could actually be some modifications to the strings.Fix should be simply to allocate new strings on the heap and copy/concatenate things over. I'm willing to help out when I can.
The text was updated successfully, but these errors were encountered: