]> git.ipfire.org Git - thirdparty/coreutils.git/commit
od: initialize type-size tables statically
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 27 Jun 2025 06:51:37 +0000 (23:51 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 29 Jun 2025 04:00:41 +0000 (21:00 -0700)
commitd8aaafc09492e9edef7bcd74f8da332b54e02d74
tree5651eb73a13b8da16016fedce6fcc8f19b06769a
parent4d527dda583f6d3b0bd66364549472a5d98cef67
od: initialize type-size tables statically

* src/od.c (NO_SIZE): Make it explicitly 0, as the
initializers now rely on this.
(MAX_INTEGRAL_TYPE_SIZE): Remove.  All uses replaced by
ARRAY_CARDINALITY (integral_type_size) - 1.
Move static assertion down to where this can be used.
(integral_type_size, fp_type_size): Make them const,
and initialize them statically.
(main): Omit no-longer-needed initialization code.
src/od.c