[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-bug: [ geda-Bugs-1620806 ] various probably bugs and comments about them



Bugs item #1620806, was opened at 2006-12-22 09:18
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=818426&aid=1620806&group_id=161080

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: CVS
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Dan McMahill (danmc)
Assigned to: Nobody/Anonymous (nobody)
Summary: various probably bugs and comments about them

Initial Comment:

Hello,

I was digging through compiler warnings (it is getting to be a hobby by now) and trying to see what they all mean and the following ones look like they are real bugs.  These are all of the ones which I didn't fix myself already.  For the record, these is on solaris/sparc with the sun studio compiler.

gschem/src:

"o_grips.c", line 1246: warning: enum type mismatch: arg #5

The offending line is:

          gdk_gc_set_line_attributes(w_current->gc, size,
                                     GDK_LINE_SOLID,
                                     GDK_CAP_BUTT,
                                     GDK_CAP_NOT_LAST);

the problem is that the last argument is supposed to be
typedef enum
{
  GDK_JOIN_MITER,
  GDK_JOIN_ROUND,
  GDK_JOIN_BEVEL
} GdkJoinStyle;

I'm just not sure what the intention was in this spot in the code.


"o_net.c", line 77: warning: enum type mismatch: arg #5
"o_net.c", line 82: warning: enum type mismatch: arg #5

 same thing:

    gdk_gc_set_line_attributes(w_current->gc, size,
                               GDK_LINE_SOLID,
                               GDK_CAP_BUTT,
                               GDK_CAP_NOT_LAST);

    gdk_gc_set_line_attributes(w_current->bus_gc, size,
                               GDK_LINE_SOLID,
                               GDK_CAP_BUTT,
                               GDK_CAP_NOT_LAST);


"o_bus.c", line 70: warning: enum type mismatch: arg #5

same thing:

    gdk_gc_set_line_attributes(w_current->gc, size, GDK_LINE_SOLID,
                               GDK_CAP_BUTT,
                               GDK_CAP_NOT_LAST);


Moving on to gattrib/src:

"globals.c", line 64: warning: initialization type mismatch

void (*quit_func)() = gattrib_quit;

however, gattrib_quit is:

gint gattrib_quit(gint return_code);

it would probably be good to make these types match.

  "s_object.c", line 320: warning: argument #1 is incompatible with prototype:

o_selection_add(pr_current->page_current->selection_list,
                  pr_current->page_current->object_tail);

I'm assuming this was missed in the GList conversion.


Also in gattrib, every file which is compiled produces:

"../include/gettext.h", line 45: warning: macro redefined: gettext
"../include/gettext.h", line 46: warning: macro redefined: dgettext
"../include/gettext.h", line 47: warning: macro redefined: dcgettext
"../include/gettext.h", line 48: warning: macro redefined: ngettext
"../include/gettext.h", line 50: warning: macro redefined: dngettext
"../include/gettext.h", line 52: warning: macro redefined: dcngettext
"../include/gettext.h", line 54: warning: macro redefined: textdomain
"../include/gettext.h", line 55: warning: macro redefined: bindtextdomain
"../include/gettext.h", line 56: warning: macro redefined: bind_textdomain_codeset

I didn't trace all the way through, but I suspect that there is a header included which should not be.

utils/src:

"sarlacc_schem.c", line 176: warning: argument #1 is incompatible with prototype:
        prototype: pointer to const char : "/usr/include/iso/string_iso.h", line 72
        argument : pointer to unsigned char

I don't know how to test sarlacc so I didn't change anything right there.

finally, one last one in gschem/src

"g_hook.c", line 673: warning: statement not reached

it is true that this statement is not reached.  Removing that line causes gcc to complain that end of function reached with no return value in a non-void function.  Don't know if there is some "not reached" gcc attribute which could be used.  There is no particular harm in having this line there or not except that it causes continual noise in the compiler output.  And we should all be taking the warnings somewhat seriously because sometimes they point to actual bugs.


-Dan


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=818426&aid=1620806&group_id=161080


_______________________________________________
geda-bug mailing list
geda-bug@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-bug