Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning from -Wcast-qual: cast discards const qualifier #160

Open
Rangi42 opened this issue Mar 14, 2022 · 0 comments
Open

Warning from -Wcast-qual: cast discards const qualifier #160

Rangi42 opened this issue Mar 14, 2022 · 0 comments

Comments

@Rangi42
Copy link

Rangi42 commented Mar 14, 2022

In readChunk_iTXt:

error = lodepng_add_itext_sized(info, key, langtag, transkey, (char*)(data + begin), length);

data is a const char*. It happens that lodepng_add_itext_sized takes a const char* str, so this can become:

error = lodepng_add_itext_sized(info, key, langtag, transkey, (const char*)(data + begin), length);

The same (char*) to (const char*) change could be done here:

if(!error) error = lodepng_add_itext_sized(info, key, langtag, transkey, (char*)str, size);
Rangi42 added a commit to Rangi42/pokegold that referenced this issue Oct 14, 2022
Rangi42 added a commit to Rangi42/pokecrystal that referenced this issue Oct 14, 2022
Idain pushed a commit to Idain/pokecrystal that referenced this issue Sep 11, 2023
Idain pushed a commit to Idain/pokecrystal that referenced this issue Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant