From: Nick Bowler Date: Tue, 21 Sep 2021 02:56:14 +0000 (-0400) Subject: Don't use [static n] in function prototypes. X-Git-Url: http://git.draconx.ca/gitweb/liblbx.git/commitdiff_plain/567ed0920d13037a60c73b5a596ea45cacbeb001 Don't use [static n] in function prototypes. This modern C feature is mostly useless and introduces compatibility problems for no good reason. --- diff --git a/src/image.c b/src/image.c index bd207e7..24dce99 100644 --- a/src/image.c +++ b/src/image.c @@ -65,7 +65,7 @@ struct lbx_image_priv { unsigned long offsets[]; }; -static struct lbx_image_priv *lbx_img_init(unsigned char hdr[static HDR_LEN]) +static struct lbx_image_priv *lbx_img_init(unsigned char *hdr) { unsigned short nframes = unpack_16_le(hdr+6); struct lbx_image_priv *img; diff --git a/src/lbx.c b/src/lbx.c index f96344d..17c68b1 100644 --- a/src/lbx.c +++ b/src/lbx.c @@ -51,7 +51,7 @@ struct lbx_file_state { int eof; }; -static struct lbx_priv *lbx_init(unsigned char hdr[static LBX_HDR_SIZE]) +static struct lbx_priv *lbx_init(unsigned char *hdr) { unsigned short nfiles = unpack_16_le(hdr+0); unsigned long magic = unpack_32_le(hdr+2); diff --git a/src/lbximg.c b/src/lbximg.c index 5beaaae..80ffea5 100644 --- a/src/lbximg.c +++ b/src/lbximg.c @@ -191,10 +191,10 @@ int parserange(unsigned frames, char *str, unsigned char *bits) return 0; } -int output(unsigned int frameno, const struct img_format *fmt, - unsigned char *pixels, unsigned char *pixel_mask, - unsigned int width, unsigned int height, - struct lbx_colour palette[static 256]) +static int output(unsigned int frameno, const struct img_format *fmt, + unsigned char *pixels, unsigned char *pixel_mask, + unsigned int width, unsigned int height, + struct lbx_colour *palette) { char name[strlen(outname) + sizeof ".65535.png"]; FILE *of; @@ -227,7 +227,7 @@ int output(unsigned int frameno, const struct img_format *fmt, return 0; } -static int loadoverride(FILE *f, struct lbx_colour palette[static 256]) +static int loadoverride(FILE *f, struct lbx_colour *palette) { struct lbx_image *img; int rc, ret = 0;