Bug 142800

Summary: 8 * function declared but never referenced
Product: [Fedora] Fedora Reporter: David Binderman <dcb314>
Component: bashAssignee: Tim Waugh <twaugh>
Status: CLOSED WONTFIX QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-12-14 10:18:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Binderman 2004-12-14 08:55:27 UTC
Description of problem:

I just tried to compile package bash-3.0-25 from 
Redhat Fedora development tree.

The compiler said

./parse.y(4455): remark #177: function "discard_parser_constructs" was
declared
but never referenced
variables.c(1002): remark #177: function "null_assign" was declared
but never referenced
subst.c(184): remark #177: function "quoted_substring" was declared
but never referenced
subst.c(185): remark #177: function "quoted_strlen" was declared but
never referenced
subst.c(219): remark #177: function "mb_getcharlens" was declared but
never referenced
subst.c(239): remark #177: function "variable_remove_pattern" was
declared but never referenced
./ulimit.def(711): remark #177: function "set_all_limits" was declared
but never referenced
readline.c(872): remark #177: function "reset_default_bindings" was
declared but never referenced

Suggest delete dead code.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Tim Waugh 2004-12-14 10:18:10 UTC
parse.y: can't do anything about generated code
variables.c: for *this* particular set of build parameter, the function is not
called, but for some cases (without ARRAY_VARS for instance) it is.

For subst.c, you'll find that the functions are inside INCLUDE_UNUSED -- try
compiling without that.

Also don't forget that bash provides support for extension modules dynamically
loaded at runtime.

Tip: when you file bug reports about compiler warnings, it pays to look at the
code in question first.  You might find that the warnings are bogus.