OpenSolaris

Printable Version Enter a New Search
Bug ID 6268229
Synopsis gcc and snoop don't get along
State 10-Fix Delivered (Fix available in build)
Category:Subcategory network:snoop
Keywords onnv_triage | tonic-gcc
Responsible Engineer Kacheong Poon
Reported Against snv_14
Duplicate Of
Introduced In solaris_2.0
Commit to Fix snv_23
Fixed In snv_23
Release Fixed solaris_nevada(snv_23) , solaris_10u3(s10u3_01) (Bug ID:2137785)
Related Bugs 6388517
Submit Date 10-May-2005
Last Update Date 18-September-2005
Description
When building ON with gcc (on x86) there are warnings in snoop.

1. an actual bug - gcc is upset about this call in snoop_dhcp.c:

        display_ip((*start++ / 4), "%s at = %s",
                option_types[save], &start);

  it complains about the order of evaluation being undefined. The C Standard
  appears to confirm this in 6.5.2.2:

	The order of evaluation of the function designator, the actual arguments, and
	subexpressions within the actual arguments is unspecified, but there is a
	sequence point before the actually call.

  This may happen to work with cc but we may just be lucky.

2. gcc doesn't like pointer<->int conversion where the sizes differ - uintptr_t to
   the rescue.

2. other minor cleanup for gcc. things like 'static' on struct declarations,
   places we should return a value and don't, implicit ints and the like. In fact
   there seems to be a few functions that return something useful on success but
   forget to return anything on failure, which should probably be looked at.



 xxxxx@xxxxx.com 2005-05-10 21:58:55 GMT
Work Around
N/A
Comments
N/A