Bug 159166 - gnome-utils has various issues identified by intel compiler.
gnome-utils has various issues identified by intel compiler.
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gnome-utils (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ray Strode [halfline]
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-30 17:57 EDT by David Binderman
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-12 21:59:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Binderman 2005-05-30 17:57:38 EDT
Description of problem:

I just tried to compile package gnome-utils-2.10.0-3 from Redhat
Fedora Core development tree with the most excellent Intel C compiler.

The compiler said

1.

gtk.c(1702): warning #175: subscript out of range

The source code is

	set_button_state(BUT_0_BAS, (0 < basevals[(int) base]));

but

#define BUT_0_BAS     X->bas_buttons[24] 

and

    GtkWidget *bas_buttons[BROWS * BCOLS];

and

../BUILD/gnome-utils-2.10.0/gcalctool-5.5.41/gcalctool/calctool.h:#define BCOLS
         4      /* No of columns of Basic Mode buttons. */
../BUILD/gnome-utils-2.10.0/gcalctool-5.5.41/gcalctool/calctool.h:#define BROWS
         5      /* No of rows of Basic Mode buttons. */

So there are only 20 buttons, and the program tries to read the 24'th.

Suggest code rework.

2.

zoom.c(111): warning #117: non-void function "repaint_zoom" should return a value

The source code is

   g_return_if_fail (window->curlog);

The function that this line of code is in returns int. Suggest code rework.

3.

logview-findbar.c(154): warning #117: non-void function "logview_findbar_find"
should return a value

Duplicate.

4.

gdict-app.c(59): warning #117: non-void function "gdict_init_context" should
return a value

Duplicate.

5.

gdict-defbox.c(592): remark #592: variable "page_width" is used before its value
is set

The source code is

    pango_layout_set_width (layout, (page_width - LEFT_MARGIN - RIGHT_MARGIN) *
PANGO_SCALE);

Suggest init local variable "page_width" before first use.

Also, the GNU C compiler says

6.

logrtns.c:281: warning: too few arguments for format

The source code is

	g_snprintf (buff, sizeof (buff), _("%s is too big."));

%s, but no trailing parameter. Suggest code rework.



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


How reproducible:


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


Expected results:


Additional info:
Comment 1 Ray Strode [halfline] 2006-07-25 14:10:25 EDT
Hi,

would you mind trying this again with the latest gnome-utils and filing separate
bug reports for each issue?
Comment 2 David Binderman 2006-07-25 18:20:38 EDT
(In reply to comment #1)
> would you mind trying this again with the latest gnome-utils and filing separate
> bug reports for each issue?

I would like to be able to help, but I gave up using Redhat 
and Fedora over a year ago because of the quality of the support.

I find Suse a much better version of Linux.
Comment 3 Ray Strode [halfline] 2006-07-25 22:19:16 EDT
Well, thanks for your initial work.  I'm going to leave this report open for now
until I have time to confirm the individual issues in the latest version of
gnome-utils
Comment 4 Matthias Clasen 2006-08-12 21:59:46 EDT
All of these issues appear fixed one way or the other in current versions 
of gnome-utils and gcalctool.

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