This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.29.9000-52-g32db86d
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 12 Feb 2019 10:30:54 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.29.9000-52-g32db86d
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 32db86d558193ad4ad5a00926ce3c350c89eb8df (commit)
from a51bc4fe9da9f2b97877beb6692f7043f6c14a16 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=32db86d558193ad4ad5a00926ce3c350c89eb8df
commit 32db86d558193ad4ad5a00926ce3c350c89eb8df
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Feb 12 10:30:34 2019 +0000
Add fall-through comments.
This patch adds fall-through comments in some cases where -Wextra
produces implicit-fallthrough warnings.
The patch is non-exhaustive. Apart from architecture-specific code
for non-x86_64 architectures, it does not change sunrpc/xdr.c (legacy
code, probably should have such changes, but left to be dealt with
separately), or places that already had comments about the
fall-through but not matching the form expected by
-Wimplicit-fallthrough=3 (the default level with -Wextra; my
inclination is to adjust those comments to match rather than
downgrading to -Wimplicit-fallthrough=1 to allow any comment), or one
place where I thought the implicit fallthrough was not correct and so
should be handled separately as a bug fix. I think the key thing to
consider in review of this patch is whether the fall-through is indeed
intended and correct in each place where such a comment is added.
Tested for x86_64.
* elf/dl-exception.c (_dl_exception_create_format): Add
fall-through comments.
* elf/ldconfig.c (parse_conf_include): Likewise.
* elf/rtld.c (print_statistics): Likewise.
* locale/programs/charmap.c (parse_charmap): Likewise.
* misc/mntent_r.c (__getmntent_r): Likewise.
* posix/wordexp.c (parse_arith): Likewise.
(parse_backtick): Likewise.
* resolv/ns_ttl.c (ns_parse_ttl): Likewise.
* sysdeps/x86/cpu-features.c (init_cpu_features): Likewise.
* sysdeps/x86_64/dl-machine.h (elf_machine_rela): Likewise.
diff --git a/ChangeLog b/ChangeLog
index 6f1d967..19e9200 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2019-02-12 Joseph Myers <joseph@codesourcery.com>
+
+ * elf/dl-exception.c (_dl_exception_create_format): Add
+ fall-through comments.
+ * elf/ldconfig.c (parse_conf_include): Likewise.
+ * elf/rtld.c (print_statistics): Likewise.
+ * locale/programs/charmap.c (parse_charmap): Likewise.
+ * misc/mntent_r.c (__getmntent_r): Likewise.
+ * posix/wordexp.c (parse_arith): Likewise.
+ (parse_backtick): Likewise.
+ * resolv/ns_ttl.c (ns_parse_ttl): Likewise.
+ * sysdeps/x86/cpu-features.c (init_cpu_features): Likewise.
+ * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Likewise.
+
2019-02-11 Paul A. Clarke <pc@us.ibm.com>
* sysdeps/powerpc/fpu/e_sqrt.c (__slow_ieee754_sqrtf):
diff --git a/elf/dl-exception.c b/elf/dl-exception.c
index f97d179..7ee19a7 100644
--- a/elf/dl-exception.c
+++ b/elf/dl-exception.c
@@ -123,6 +123,7 @@ _dl_exception_create_format (struct dl_exception *exception, const char *objname
++p;
break;
}
+ /* Fall through. */
case 'x':
length += INT_WIDTH / 4;
break;
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
index 206cd51..3bc9e61 100644
--- a/elf/ldconfig.c
+++ b/elf/ldconfig.c
@@ -1228,6 +1228,7 @@ parse_conf_include (const char *config_file, unsigned int lineno,
case GLOB_NOSPACE:
errno = ENOMEM;
+ /* Fall through. */
case GLOB_ABORTED:
if (opt_verbose)
error (0, errno, _("%s:%u: cannot read directory %s"),
diff --git a/elf/rtld.c b/elf/rtld.c
index 5a90e78..44361ba 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -2738,8 +2738,10 @@ print_statistics (hp_timing_t *rtld_total_timep)
{
case 3:
*wp++ = *cp++;
+ /* Fall through. */
case 2:
*wp++ = *cp++;
+ /* Fall through. */
case 1:
*wp++ = '.';
*wp++ = *cp++;
@@ -2801,8 +2803,10 @@ print_statistics (hp_timing_t *rtld_total_timep)
{
case 3:
*wp++ = *cp++;
+ /* Fall through. */
case 2:
*wp++ = *cp++;
+ /* Fall through. */
case 1:
*wp++ = '.';
*wp++ = *cp++;
diff --git a/locale/programs/charmap.c b/locale/programs/charmap.c
index cba8397..0dbd8d3 100644
--- a/locale/programs/charmap.c
+++ b/locale/programs/charmap.c
@@ -713,6 +713,7 @@ only WIDTH definitions are allowed to follow the CHARMAP definition"));
state = 95;
continue;
}
+ /* Fall through. */
case 96:
if (nowtok != tok_number)
diff --git a/misc/mntent_r.c b/misc/mntent_r.c
index 1d5e259..5d88c45 100644
--- a/misc/mntent_r.c
+++ b/misc/mntent_r.c
@@ -174,8 +174,10 @@ __getmntent_r (FILE *stream, struct mntent *mp, char *buffer, int bufsiz)
{
case 0:
mp->mnt_freq = 0;
+ /* Fall through. */
case 1:
mp->mnt_passno = 0;
+ /* Fall through. */
case 2:
break;
}
diff --git a/posix/wordexp.c b/posix/wordexp.c
index 825ad97..248de77 100644
--- a/posix/wordexp.c
+++ b/posix/wordexp.c
@@ -799,6 +799,7 @@ parse_arith (char **word, size_t *word_length, size_t *max_length,
case '(':
++paren_depth;
+ /* Fall through. */
default:
expr = w_addchar (expr, &expr_length, &expr_maxlen, words[*offset]);
if (expr == NULL)
@@ -2127,6 +2128,7 @@ parse_backtick (char **word, size_t *word_length, size_t *max_length,
case '\'':
squoting = 1 - squoting;
+ /* Fall through. */
default:
comm = w_addchar (comm, &comm_length, &comm_maxlen, words[*offset]);
if (comm == NULL)
diff --git a/resolv/ns_ttl.c b/resolv/ns_ttl.c
index 0799487..d29d9dc 100644
--- a/resolv/ns_ttl.c
+++ b/resolv/ns_ttl.c
@@ -113,9 +113,13 @@ ns_parse_ttl(const char *src, u_long *dst) {
ch = toupper(ch);
switch (ch) {
case 'W': tmp *= 7;
+ /* Fall through. */
case 'D': tmp *= 24;
+ /* Fall through. */
case 'H': tmp *= 60;
+ /* Fall through. */
case 'M': tmp *= 60;
+ /* Fall through. */
case 'S': break;
default: goto einval;
}
diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c
index 121f706..4c7d93a 100644
--- a/sysdeps/x86/cpu-features.c
+++ b/sysdeps/x86/cpu-features.c
@@ -375,6 +375,7 @@ init_cpu_features (struct cpu_features *cpu_features)
of Core i3/i5/i7 processors if AVX is available. */
if (!CPU_FEATURES_CPU_P (cpu_features, AVX))
break;
+ /* Fall through. */
case 0x1a:
case 0x1e:
@@ -402,6 +403,7 @@ init_cpu_features (struct cpu_features *cpu_features)
/* Xeon E7 v3 with stepping >= 4 has working TSX. */
if (stepping >= 4)
break;
+ /* Fall through. */
case 0x3c:
case 0x45:
case 0x46:
diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h
index d10e08a..95a13b3 100644
--- a/sysdeps/x86_64/dl-machine.h
+++ b/sysdeps/x86_64/dl-machine.h
@@ -347,6 +347,7 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
/* Set to symbol size plus addend. */
value = sym->st_size;
# endif
+ /* Fall through. */
case R_X86_64_GLOB_DAT:
case R_X86_64_JUMP_SLOT:
*reloc_addr = value + reloc->r_addend;
@@ -460,6 +461,7 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
/* Set to symbol size plus addend. */
value = sym->st_size;
# endif
+ /* Fall through. */
case R_X86_64_32:
value += reloc->r_addend;
*(unsigned int *) reloc_addr = value;
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 14 ++++++++++++++
elf/dl-exception.c | 1 +
elf/ldconfig.c | 1 +
elf/rtld.c | 4 ++++
locale/programs/charmap.c | 1 +
misc/mntent_r.c | 2 ++
posix/wordexp.c | 2 ++
resolv/ns_ttl.c | 4 ++++
sysdeps/x86/cpu-features.c | 2 ++
sysdeps/x86_64/dl-machine.h | 2 ++
10 files changed, 33 insertions(+), 0 deletions(-)
hooks/post-receive
--
GNU C Library master sources