From: Nick Bowler Date: Sun, 27 Feb 2022 19:18:58 +0000 (-0500) Subject: Don't use [static n] in prototypes. X-Git-Url: http://git.draconx.ca/gitweb/upkg.git/commitdiff_plain/ab9b40939aa8a68902e0fc38a7ba1db165d10788 Don't use [static n] in prototypes. This modern C syntax is mostly useless and introduces compatibility problems for no real benefit. --- diff --git a/src/libupkg.c b/src/libupkg.c index ed652ac..f6de123 100644 --- a/src/libupkg.c +++ b/src/libupkg.c @@ -132,7 +132,7 @@ size_t upkg_decode_index(long *val, const unsigned char *bytes, size_t n) return 0; } -static struct upkg_priv *init_upkg(unsigned char hdr[static UPKG_HDR_SIZE]) +static struct upkg_priv *init_upkg(const unsigned char *hdr) { struct upkg_priv *pkg; diff --git a/src/upkg.c b/src/upkg.c index 6c8cbc1..db9a747 100644 --- a/src/upkg.c +++ b/src/upkg.c @@ -171,7 +171,7 @@ static void print_upkg_object_flags(const char *prefix, unsigned long flags) printf("%sDebugDestroy\n", prefix); } -void print_guid(unsigned char guid[static 16]) +static void print_guid(unsigned char *guid) { for (unsigned i = 0; i < 16; i++) { printf("%02hhx", guid[i]);