Bug 133275 - six compile time detectable problems
Summary: six compile time detectable problems
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: unixODBC
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tom Lane
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-09-22 20:33 UTC by David Binderman
Modified: 2013-07-03 03:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-10-30 14:53:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Binderman 2004-09-22 20:33:43 UTC
Description of problem:


I just tried to compile package unixODBC-2.2.8-6 from
Redhat Fedora Core 3 Test 2.

The compiler said

1.

CTracing.cpp(88): warning #592: variable "szForce" is used before its
value is set

The source code is

            || ( toupper( szTracing[0] ) == 'O' && toupper( szForce[0]
) == 'N'
))

Suggest init szForce[ 0] before first use.

2.

convert.c(214): remark #592: variable "st" is used before its value is set

The source code is

        setup_ts( st );

Suggest init st before first use.

3.

info.c(2043): remark #592: variable "htbl_stmt" is used before its
value is set

The source code is

                PG__SQLFreeStmt(htbl_stmt, SQL_DROP);

Suggest init htbl_stmt before first use.

4.

info.c(2227): remark #592: variable "htbl_stmt" is used before its
value is set

Same again.

5.

results.cpp(872): warning #267: the format string requires additional
arguments

The source code is

	sprintf( str, "        interval.interval_type: %d (%s)\n",
             odbctest -> int_type_as_string( val.interval_type ));

%d and %s, but only one following parameter.

6.

results.cpp(904): warning #267: the format string requires additional
arguments

Duplicate.

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


How reproducible:


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


Expected results:


Additional info:

Comment 1 Tom Lane 2004-09-23 20:57:24 UTC
Hmm, it looks like most of these are still in the 2.2.9 upstream
release.  I will consult with those guys about fixing them.

Comment 2 Tom Lane 2004-09-28 19:18:56 UTC
BTW, what compiler and what compiler options did you use?  I cannot
get gcc to warn about these things at all.

Comment 3 David Binderman 2004-10-02 18:21:17 UTC
>what compiler and what compiler options did you use?

I used Intel's compiler with -Wall option.

A much better compiler than gcc, IMHO.

>I cannot get gcc to warn about these things at all.

So if the gcc cannot find the bugs, are they not a bug ?

Intel's icc can find them.

Comment 4 Matthew Miller 2006-07-10 20:59:59 UTC
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!


Comment 5 John Thacker 2006-10-30 14:53:23 UTC
Closing per lack of response to previous request for information.
Note that FC3 and FC4 are supported by Fedora Legacy for security
fixes only.  Please install a still supported version and retest.  If
it still occurs on FC5 or FC6, please reopen and assign to the correct
version.  Otherwise, if this a security issue, please change the
product to Fedora Legacy.  Thanks, and we are sorry that we did not
get to this bug earlier.


Note You need to log in before you can comment on or make changes to this bug.