diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-05-05 14:04:20 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-05-05 14:05:13 -0400 |
commit | c34076b2a591f8fc134b73d664fd8bd0b438d8ec (patch) | |
tree | 54f7fca8ca31fa586d753103c17543dd7bacaf8e | |
parent | d7c541742f5e6ec07dbcc8e1346efde9d807437e (diff) | |
download | rockbox-c34076b2a5.tar.gz rockbox-c34076b2a5.zip |
Theme Editor: Make it compile with modern toolchains
Change-Id: Idc0ef3dd34ab186b4ea40f4d916a2addf87eb478
-rw-r--r-- | utils/themeeditor/quazip/crypt.h | 8 | ||||
-rw-r--r-- | utils/themeeditor/quazip/unzip.c | 6 | ||||
-rw-r--r-- | utils/themeeditor/quazip/zip.c | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/utils/themeeditor/quazip/crypt.h b/utils/themeeditor/quazip/crypt.h index 82748c5715..2316f0c604 100644 --- a/utils/themeeditor/quazip/crypt.h +++ b/utils/themeeditor/quazip/crypt.h @@ -32,7 +32,7 @@ /*********************************************************************** * Return the next byte in the pseudo-random sequence */ -static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab) +static int decrypt_byte(unsigned long* pkeys, const uint32_t* pcrc_32_tab) { (void) pcrc_32_tab; /* avoid "unused parameter" warning */ unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an @@ -46,7 +46,7 @@ static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab) /*********************************************************************** * Update the encryption keys with the next byte of plain text */ -static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c) +static int update_keys(unsigned long* pkeys,const uint32_t* pcrc_32_tab,int c) { (*(pkeys+0)) = CRC32((*(pkeys+0)), c); (*(pkeys+1)) += (*(pkeys+0)) & 0xff; @@ -63,7 +63,7 @@ static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int * Initialize the encryption keys and the random header according to * the given password. */ -static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab) +static void init_keys(const char* passwd,unsigned long* pkeys,const uint32_t* pcrc_32_tab) { *(pkeys+0) = 305419896L; *(pkeys+1) = 591751049L; @@ -93,7 +93,7 @@ static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting) unsigned char *buf; /* where to write header */ int bufSize; unsigned long* pkeys; - const unsigned long* pcrc_32_tab; + const uint32_t* pcrc_32_tab; unsigned long crcForCrypting; { int n; /* index in random header */ diff --git a/utils/themeeditor/quazip/unzip.c b/utils/themeeditor/quazip/unzip.c index ace7a08837..59bab3ccc1 100644 --- a/utils/themeeditor/quazip/unzip.c +++ b/utils/themeeditor/quazip/unzip.c @@ -147,7 +147,7 @@ typedef struct int encrypted; # ifndef NOUNCRYPT unsigned long keys[3]; /* keys defining the pseudo-random sequence */ - const unsigned long* pcrc_32_tab; + const uint32_t* pcrc_32_tab; # endif } unz_s; @@ -204,7 +204,7 @@ local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX) uLong *pX; { uLong x ; - int i; + int i = 0; int err; err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); @@ -232,7 +232,7 @@ local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX) uLong *pX; { uLong x ; - int i; + int i = 0; int err; err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i); diff --git a/utils/themeeditor/quazip/zip.c b/utils/themeeditor/quazip/zip.c index 13463fe336..77c8726b3a 100644 --- a/utils/themeeditor/quazip/zip.c +++ b/utils/themeeditor/quazip/zip.c @@ -130,7 +130,7 @@ typedef struct int encrypt; #ifndef NOCRYPT unsigned long keys[3]; /* keys defining the pseudo-random sequence */ - const unsigned long* pcrc_32_tab; + const uint32_t* pcrc_32_tab; int crypt_header_size; #endif } curfile_info; |