Date: Mon, 02 Jan 2006 12:49:05 +1030 From: "Aluminium Oxide" <orac000@internet-mail.org> To: freebsd-net@freebsd.org Subject: Fwd: /usr/src/lib/libc/net/res_debug.c: compile problem fixed Message-ID: <1136168345.18174.250886155@webmail.messagingengine.com>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --_----------=_1136168345181740 Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.15; A1.64; B3.05; Q3.03) Date: Mon, 2 Jan 2006 02:19:05 UT Oops. Let's try that again, with the attachments this time... On Mon, 02 Jan 2006 12:39:26 +1030, "Aluminium Oxide" <orac000@internet-mail.org> said: > I've fixed a problem with res_debug.c, which, during a make buildworld > on a 6.0 RELEASE i386 system cvsupped yesterday, was stopping with > these errors : > > ============================================================ > ..... > In file included from /usr/src/lib/libc/net/res_debug.c:733: > > /usr/src/lib/libc/net/res_debug.c: in function '__loc_aton' : > /usr/src/lib/libc/net/res_debug.c:733: warning: passing arg 1 of > 'latlon2ul' from incompatible pointer type > /usr/src/lib/libc/net/res_debug.c:735: warning: passing arg 1 of > 'latlon2ul' from incompatible pointer type > /usr/src/lib/libc/net/res_debug.c:786: warning: passing arg 1 of > 'latlon2ul' from incompatible pointer type > /usr/src/lib/libc/net/res_debug.c:797: warning: passing arg 1 of > 'latlon2ul' from incompatible pointer type > /usr/src/lib/libc/net/res_debug.c:808: warning: passing arg 1 of > 'latlon2ul' from incompatible pointer type > > *** Error code 1 > Stop in /usr/src/lib/libc/ > ...... > Stop in /usr/src. > ============================================================ > > I have fixed this and would like to either create a patch for the code > in question, or if you prefer simply replacing the code (26Kb) with the > attached code. Either way, I am not the most experienced C programmer > and would like my changes checked. > > Below is the output of `diff res_debug.org.c res_debug.c` > > I've also attached this. > ===================================================== > 574,575c574,575 > < precsize_aton(strptr) > < char **strptr; > --- > > precsize_aton(char **strptr) > > /* char **strptr; */ > 616,618c616,618 > < latlon2ul(latlonstrptr,which) > < char **latlonstrptr; > < int *which; > --- > > latlon2ul(char *latlonstrptr,int *which) > > /* char **latlonstrptr; */ > > /* int *which; */ > 624c624 > < cp = *latlonstrptr; > --- > > cp = latlonstrptr; > 707c707 > < *latlonstrptr = cp; > --- > > latlonstrptr = cp; > 719c719,720 > < const char *cp, *maxcp; > --- > > char *cp; > > char *maxcp; > 730,731c731,732 > < cp = ascii; > < maxcp = cp + strlen(ascii); > --- > > *cp = *ascii; > > *maxcp = *cp + strlen(ascii); > 733c734 > < lltemp1 = latlon2ul(&cp, which1); > --- > > lltemp1 = latlon2ul(cp, which1); > 735c736 > < lltemp2 = latlon2ul(&cp, which2); > --- > > lltemp2 = latlon2ul(cp, which2); > 737c738 > < switch (which1 + which2) { > --- > > switch (*which1 + *which2) { > 739c740 > < if ((which1 == 1) && (which2 == 2)) { /* normal case */ > --- > > if ((*which1 == 1) && (*which2 == 2)) { /* normal case */ > 742c743,744 > < } else if ((which1 == 2) && (which2 == 1)) { /* reversed > */ > --- > > } else if ((*which1 == 2) && (*which2 == 1)) { /* reversed > > */ > > ===================================================== ===================== Sub UNIX lumen Damien Miller orac000@internet-mail.org ===================== -- Aluminium Oxide orac000@internet-mail.org -- http://www.fastmail.fm - A fast, anti-spam email service. --_----------=_1136168345181740 Content-Disposition: attachment; filename="res_debug.c.org" Content-Transfer-Encoding: base64 Content-Type: application/octet-stream; name="res_debug.c.org" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.15; A1.64; B3.05; Q3.03) Date: Mon, 2 Jan 2006 02:19:05 UT --_----------=_1136168345181740 Content-Disposition: attachment; filename="res_debug.c.diff" Content-Transfer-Encoding: base64 Content-Type: text/x-patch; name="res_debug.c.diff" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.15; A1.64; B3.05; Q3.03) Date: Mon, 2 Jan 2006 02:19:05 UT NTc0LDU3NWM1NzQsNTc1CjwgcHJlY3Npem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Y2ggKCp3aGljaDEgKyAqd2hpY2gyKSB7CjczOWM3NDAK PCAJCWlmICgod2hpY2gxID09IDEpICYmICh3aGljaDIgPT0gMikpIHsgLyog bm9ybWFsIGNhc2UgKi8KLS0tCj4gCQlpZiAoKCp3aGljaDEgPT0gMSkgJiYg KCp3aGljaDIgPT0gMikpIHsgLyogbm9ybWFsIGNhc2UgKi8KNzQyYzc0Myw3 NDQKPCAJCX0gZWxzZSBpZiAoKHdoaWNoMSA9PSAyKSAmJiAod2hpY2gyID09 IDEpKSB7IC8qIHJldmVyc2VkICovCi0tLQo+IAkJfSBlbHNlIGlmICgoKndo aWNoMSA9PSAyKSAmJiAoKndoaWNoMiA9PSAxKSkgeyAvKiByZXZlcnNlZCAK PiAqLwo= --_----------=_1136168345181740--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1136168345.18174.250886155>