mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
misc: Correct various -Wunterminated-string-initialization warnings
-Wunterminates-string-initialization will complain if we try to shove a "string" into a fixed array that is too small. Sometimes this is intentional; when you are merely using "string" as a standin for "non-terminated sequence of bytes". In these cases we need to mark the "string" as "not actually a string" with an attribute. Applies to GCC >=8, but this warning isn't pulled in by -Wextra until GCC >= 15. Change-Id: Ib94410a22f4587940b16cf03d539fbadc3373686
This commit is contained in:
parent
c65050571e
commit
180753ce0a
6 changed files with 57 additions and 49 deletions
|
|
@ -199,7 +199,7 @@ void init_memory (void)
|
|||
static struct {
|
||||
enum story story_id;
|
||||
zword release;
|
||||
zbyte serial[6];
|
||||
zbyte serial[6] __NONSTRING;
|
||||
} records[] = {
|
||||
{ SHERLOCK, 21, "871214" },
|
||||
{ SHERLOCK, 26, "880127" },
|
||||
|
|
@ -426,7 +426,7 @@ static void free_undo (int count)
|
|||
|
||||
void reset_memory (void)
|
||||
{
|
||||
if (story_fp != -1)
|
||||
if (story_fp != -1)
|
||||
fclose (story_fp);
|
||||
story_fp = -1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue