Bug 162143 - 'offset' is used uninitialized in this function
Summary: 'offset' is used uninitialized in this function
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gtkhtml3
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Dave Malcolm
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC5Target
TreeView+ depends on / blocked
 
Reported: 2005-06-30 10:08 UTC by David Binderman
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-12-13 04:15:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Binderman 2005-06-30 10:08:15 UTC
Description of problem:

I just tried to compile package gtkhtml3-3.6.2-1 from Redhat
Fedora Core development tree with the gcc 4.0.0 compiler and
the compiler flag -Wall.

The compiler said

gtkhtml.c:3285: warning: 'offset' is used uninitialized in this function

The source code is

        D_IM (printf ("IM gtk_html_im_retrieve_surrounding_cb\n");)
        gtk_im_context_set_surrounding (context, get_surrounding_text
(html->engine, &offset), -1, offset);

I agree with the compiler. This code would benefit from rework, because
there is no defined ordering on the evaluation of function parameters.


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


How reproducible:


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


Expected results:


Additional info:

Comment 1 Dave Malcolm 2005-08-18 03:30:41 UTC
Thanks for this report.  I'll try to get this fixed upstream.

Comment 2 Dave Malcolm 2005-08-18 21:04:30 UTC
I've sent a patch upstream for this

Comment 3 Dave Malcolm 2005-12-13 04:15:24 UTC
(this is now fixed in upstream CVS, and in the current rawhide gtkhtml3 tarball)


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