From f968d6032ab32db179a7617158078e488b1f0748 Mon Sep 17 00:00:00 2001 From: James Buren Date: Tue, 6 Apr 2021 21:56:55 -0500 Subject: ipodpatcher: fix warning for apple stop sign constant Convert both instances of the apple stop sign constant to char array instances. This ensures sizeof will work as expected when applied to the constant. Change-Id: I8599f7b0a00031e944e654b12a0bc59309926807 --- rbutil/ipodpatcher/ipodpatcher.c | 32 ++++++++++++++++---------------- tools/scramble.c | 32 ++++++++++++++++---------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/rbutil/ipodpatcher/ipodpatcher.c b/rbutil/ipodpatcher/ipodpatcher.c index 6df9060bdc..e047e52abe 100644 --- a/rbutil/ipodpatcher/ipodpatcher.c +++ b/rbutil/ipodpatcher/ipodpatcher.c @@ -53,22 +53,22 @@ int ipod_verbose = 0; /* The following string appears at the start of the firmware partition */ -static const char *apple_stop_sign = "{{~~ /-----\\ "\ - "{{~~ / \\ "\ - "{{~~| | "\ - "{{~~| S T O P | "\ - "{{~~| | "\ - "{{~~ \\ / "\ - "{{~~ \\-----/ "\ - "Copyright(C) 200"\ - "1 Apple Computer"\ - ", Inc.----------"\ - "----------------"\ - "----------------"\ - "----------------"\ - "----------------"\ - "----------------"\ - "---------------"; +static const char apple_stop_sign[] = "{{~~ /-----\\ "\ + "{{~~ / \\ "\ + "{{~~| | "\ + "{{~~| S T O P | "\ + "{{~~| | "\ + "{{~~ \\ / "\ + "{{~~ \\-----/ "\ + "Copyright(C) 200"\ + "1 Apple Computer"\ + ", Inc.----------"\ + "----------------"\ + "----------------"\ + "----------------"\ + "----------------"\ + "----------------"\ + "---------------"; /* Windows requires the buffer for disk I/O to be aligned in memory on a multiple of the disk volume size - so we use a single global variable diff --git a/tools/scramble.c b/tools/scramble.c index a529caea03..24ed4ba0e6 100644 --- a/tools/scramble.c +++ b/tools/scramble.c @@ -663,22 +663,22 @@ static int iaudio_encode(char *iname, char *oname, char *idstring) static int ipod_encode(char *iname, char *oname, int fw_ver, bool fake_rsrc) { - static const char *apple_stop_sign = "{{~~ /-----\\ "\ - "{{~~ / \\ "\ - "{{~~| | "\ - "{{~~| S T O P | "\ - "{{~~| | "\ - "{{~~ \\ / "\ - "{{~~ \\-----/ "\ - "Copyright(C) 200"\ - "1 Apple Computer"\ - ", Inc.----------"\ - "----------------"\ - "----------------"\ - "----------------"\ - "----------------"\ - "----------------"\ - "---------------"; + static const char apple_stop_sign[] = "{{~~ /-----\\ "\ + "{{~~ / \\ "\ + "{{~~| | "\ + "{{~~| S T O P | "\ + "{{~~| | "\ + "{{~~ \\ / "\ + "{{~~ \\-----/ "\ + "Copyright(C) 200"\ + "1 Apple Computer"\ + ", Inc.----------"\ + "----------------"\ + "----------------"\ + "----------------"\ + "----------------"\ + "----------------"\ + "---------------"; size_t len; int length; int rsrclength; -- cgit v1.2.3