diff options
author | NRK <nrk@disroot.org> | 2023-06-30 04:10:00 +0600 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-06-30 10:22:15 +0200 |
commit | 0bfafd2451b25d25d3a8249373dc63b5d5e94379 (patch) | |
tree | df8b8bc8cfde08f142c1fbc8553d53548c49aff4 /video/image_writer.c | |
parent | 39957c251cc1d9ee996badbc01b013489f3247f2 (diff) | |
download | mpv-0bfafd2451b25d25d3a8249373dc63b5d5e94379.tar.bz2 mpv-0bfafd2451b25d25d3a8249373dc63b5d5e94379.tar.xz |
options: drop unnecessary casts
the reason for these casts are unknown but they were presumably to
silence warnings 9 years ago. but it doesn't seem to be necessary
nowadays, so just drop the casts and also drop the `const` from the
compound literal type.
some small technical notes:
1. while string literals aren't `const` in C, writing to them is
undefined (do not ask me why). and so compilers will typically put
string literals into read only section anyways, regardless of
weather `const` was used in the source or not. so this shouldn't make
any difference codegen wise.
2. making the array of pointers `const` on the other hand might affect
codegen, eg: `(char *const []){...}`. however, that'd trigger a lot
of discarded qualifier warnings.
Diffstat (limited to 'video/image_writer.c')
0 files changed, 0 insertions, 0 deletions