about summary refs log tree commit diff
path: root/ChangeLog
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-09-03 14:01:39 +0200
committerFlorian Weimer <fweimer@redhat.com>2019-09-03 14:01:47 +0200
commit1471fa556afb428c4a4c46cf5543a4101d5bcf91 (patch)
treef74fdb5a42fb30bd7b7b56ae4c7bca3091489b51 /ChangeLog
parent9a1e7257a4292d3aea45c8317df3956f4331d8ce (diff)
downloadglibc-1471fa556afb428c4a4c46cf5543a4101d5bcf91.tar.gz
glibc-1471fa556afb428c4a4c46cf5543a4101d5bcf91.tar.xz
glibc-1471fa556afb428c4a4c46cf5543a4101d5bcf91.zip
localedef: Use initializer for flexible array member [BZ #24950]
struct charseq used a zero-length array instead of a flexible array
member.  This required a strange construct to initialize struct
charseq objects, and GCC 10 warns about that:

cc1: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
In file included from programs/repertoire.h:24,
                 from programs/localedef.h:32,
                 from programs/ld-ctype.c:35:
programs/charmap.h:63:17: note: destination object declared here
   63 |   unsigned char bytes[0];
      |                 ^~~~~
cc1: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
programs/charmap.h:63:17: note: destination object declared here
cc1: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
programs/charmap.h:63:17: note: destination object declared here
cc1: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
programs/charmap.h:63:17: note: destination object declared here

The change makes the object physically const, but it is not expected
to be modified.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog8
1 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 67ec991785..e215c4a717 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2019-09-03  Florian Weimer  <fweimer@redhat.com>
+
+	[BZ #24950]
+	* locale/programs/charmap.h (struct charseq): Turn bytes into a
+	flexible array member.
+	* locale/programs/ld-ctype.c (ctype_finish): Use initializer for
+	replace.
+
 2019-09-02  Florian Weimer  <fweimer@redhat.com>
 
 	* misc/tst-mntent-autofs.c: New file.