From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <40e76fd4ab1b047841b5829ed8015b0e@plan9.bell-labs.com> Date: Mon, 17 Apr 2006 10:52:36 -0400 From: jmk@plan9.bell-labs.com To: 9fans@cse.psu.edu Subject: Re: [9fans] Function args not checked In-Reply-To: <3096bd910604162350j7be64566i5478c547558bd9da@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: 37d9dc88-ead1-11e9-9d60-3106f5b1d025 As an aside, when you declare prototypes I find it is best to only give the types of the parameters and not declare identifiers, e.g. extern Elem mkoid(Ints *); // asn1.h rather than extern Elem mkoid(Ints *oid); // asn1.h This prevents confusion in environments where there is overuse of the pre-processor and the identifier gets substituted. --jim On Mon Apr 17 02:51:00 EDT 2006, rodolfogarciap@gmail.com wrote: >=20 > Hi, >=20 > I have this definitions: >=20 > extern Elem mkoid(Ints *oid); // asn1.h > Ints * snmp_mkoid(char *str); // snmp_asn1.h > char * oids[MAX]; >=20 > and, this: >=20 > myElem =3D mkoid(snmp_mkoid(oids[0])); >=20 > The 8c returns: >=20 > x.c:216 function args not checked: snmp_mkoid > x.c:216 argument prototype mismatch "INT" for "IND STRUCT Ints": mkoid >=20 > why? >=20 > -- > Rodolfo Garc=C3=ADa "kix" >=20