From: Matthew Fernandez Date: Fri, 7 Oct 2022 03:46:28 +0000 (-0700) Subject: sfio _Sftable: use C99 designated field initializers X-Git-Tag: 6.0.2~4^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04bd0f78ae9546bb52fb3c4b06671e7c957e224c;p=graphviz sfio _Sftable: use C99 designated field initializers Squashes a number of -Wmissing-field-initializer warnings. --- diff --git a/lib/sfio/sftable.c b/lib/sfio/sftable.c index 55fb874a7..48ed720bc 100644 --- a/lib/sfio/sftable.c +++ b/lib/sfio/sftable.c @@ -427,13 +427,11 @@ static int sfcvinit(void) /* table for floating point and integer conversions */ Sftab_t _Sftable = { - {1e1, 1e2, 1e4, 1e8, 1e16, 1e32} - , /* _Sfpos10 */ + .sf_pos10 = {1e1, 1e2, 1e4, 1e8, 1e16, 1e32}, + .sf_neg10 = {1e-1, 1e-2, 1e-4, 1e-8, 1e-16, 1e-32}, - {1e-1, 1e-2, 1e-4, 1e-8, 1e-16, 1e-32} - , /* _Sfneg10 */ - - {'0', '0', '0', '1', '0', '2', '0', '3', '0', '4', /* _Sfdec */ + .sf_dec = + {'0', '0', '0', '1', '0', '2', '0', '3', '0', '4', '0', '5', '0', '6', '0', '7', '0', '8', '0', '9', '1', '0', '1', '1', '1', '2', '1', '3', '1', '4', '1', '5', '1', '6', '1', '7', '1', '8', '1', '9', @@ -453,12 +451,11 @@ Sftab_t _Sftable = { '8', '5', '8', '6', '8', '7', '8', '8', '8', '9', '9', '0', '9', '1', '9', '2', '9', '3', '9', '4', '9', '5', '9', '6', '9', '7', '9', '8', '9', '9', - } - , + }, - "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@_", + .sf_digits = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@_", - sfcvinit, 0, - sffmtpos, - sffmtint + .sf_cvinitf = sfcvinit, + .sf_fmtposf = sffmtpos, + .sf_fmtintf = sffmtint };