Bug 1217 - regcomp.c elicits uninitialized-variable warnings with GCC 4
Summary: regcomp.c elicits uninitialized-variable warnings with GCC 4
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: regex (show other bugs)
Version: 2.3.5
: P2 minor
Target Milestone: ---
Assignee: GOTO Masanori
URL:
Keywords:
Depends on:
Blocks: 1220
  Show dependency treegraph
 
Reported: 2005-08-20 00:05 UTC by Paul Eggert
Modified: 2018-04-19 14:54 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
regcomp.c patch to avoid use of variables GCC 4 thinks are uninitialized (1.30 KB, patch)
2005-08-20 00:06 UTC, Paul Eggert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggert 2005-08-20 00:05:42 UTC
regcomp.c contains code that elicits uninitialized-variable warnings with
GCC 4.  The problem is that GCC isn't smart enough to see that when
duplicate_node returns REG_ESPACE, the uninitialized storage is not used.
I'll attach a straightforward patch that changes the signature of
duplicate_node to avoid the warnings.  My impression is that the
patch also causes GCC to generate better code, but I haven't measured
this.
Comment 1 Paul Eggert 2005-08-20 00:06:36 UTC
Created attachment 595 [details]
regcomp.c patch to avoid use of variables GCC 4 thinks are uninitialized
Comment 2 Ulrich Drepper 2005-09-06 18:04:39 UTC
Applied to trunk.