Bug 130202 - printf problems
Summary: printf problems
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Other (show other bugs)
Version: Final
Hardware: All SuSE Linux 10.0
: P2 - High : Minor
Target Milestone: ---
Assignee: Stefan Dirsch
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-23 19:18 UTC by David Binderman
Modified: 2006-05-17 19:37 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Patch which addresses all issues mentioned in Comment #1 (909 bytes, patch)
2006-05-17 19:34 UTC, Stefan Dirsch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2005-10-23 19:18:49 UTC
I just tried to compile package freesci-0.3.4c-5 with the Intel C compiler 

It said

1.

said.y(444): warning #267: the format string requires additional arguments

The source code is

	sciprintf("Error: Found %d top branches\n");

Suggest add trailing parameter.

2.

sci_view_1.c(208): warning #267: the format string requires additional arguments

The source code is

	GFXERROR("View %04x:(%d) supposed to be at illegal offset 0x%04x\n", id, i);

Three % specifiers, only two trailing parameters. Suggest code rework.
Comment 1 Michael Gross 2005-10-24 13:30:05 UTC
Hendrik: Please decide what to do here. Normally I'd say icc is not supported in this fashion, but you might want to change this.
Comment 4 Mads Martin Joergensen 2005-11-01 13:04:42 UTC
This macro expands correctly with gcc, we already have checks for making our
packages fail with these errors.

And I wont fix it for icc.
Comment 5 David Binderman 2005-11-02 10:24:27 UTC
>This macro expands correctly with gcc

I would be grateful if you could explain to me how.

BTW, do you use the -Wall flag on compilation ?
Comment 6 Mads Martin Joergensen 2005-11-02 10:30:54 UTC
Yes, we use even more than that. Most of our packages support the RPM_OPT_FLAGS
inclusing freesci:

CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"

This means that not only do we have -Wall, we also have the fortify patches in
our gcc, and flags within RPM_OPT_FLAGS to use it.

On top of that a script that checks for bad warnings in the output, so the package
wont even build with such bad warnings.
Comment 7 David Binderman 2005-11-02 19:30:49 UTC
(In reply to comment #6)
> This means that not only do we have -Wall

Good.

I've looked a little deeper into this bug report, and it still looks like
a straight forward problem with printf parameter mismatches.

It does seem however, that the two versions of GNU C compiler I used
didn't find the faults, even with -Wall flag added. I checked my log
files of the compilations.

It might be worth while constructing a bug report for GNU C.

This appears to me to be yet another occasion where Intel C can find bugs where
GNU C cannot.

In case 1, where is the integer for the %d, and in case 2, where
is the integer for the %04x ?
Comment 8 David Binderman 2006-03-17 14:31:28 UTC
(In reply to comment #7)
> In case 1, where is the integer for the %d, and in case 2, where
> is the integer for the %04x ?

I can confirm that this bug still exists in version 0.3.4c-11




Comment 9 Mads Martin Joergensen 2006-05-10 18:01:59 UTC
Fixed.
Comment 10 David Binderman 2006-05-16 10:17:33 UTC
(In reply to comment #9)
> Fixed.

I tried the version from Suse Linux 10.1 and the bug appears
to be not fixed in that version.

Is the fixed version perhaps later than the version that
went into Suse Linux 10.1 ?


Comment 11 Hendrik Vogelsang 2006-05-17 09:41:34 UTC
reassign to new maintainer
Comment 12 Stefan Dirsch 2006-05-17 19:34:03 UTC
Created attachment 83934 [details]
Patch which addresses all issues mentioned in Comment #1
Comment 13 Stefan Dirsch 2006-05-17 19:35:25 UTC
Just for the record. In 10.1 only the first issue has been fixed - for whatever reasons.
Comment 14 Stefan Dirsch 2006-05-17 19:37:14 UTC
fixed for 10.2. 

I also updated it to release 0.3.5.

- GP32 port and WinCE port (Walter van Niftrik and Ismail Khatib,respectively)
- A game selection screen (by Hugues Valois)
- Per-resource shading, to allow manual fine-tuning of SCI game graphics
- Background image drawing optimisations
- Many, many bugfixes (and maybe a couple of new bugs to spice things up).