Date: Tue, 16 Aug 2005 16:51:33 +0200 (CEST) From: Divacky Roman <xdivac02@stud.fit.vutbr.cz> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/84992: gcc4.x cleanup of usr.bin/hexdump Message-ID: <200508161451.j7GEpX1I014969@eva.fit.vutbr.cz> Resent-Message-ID: <200508161500.j7GF0RDG045365@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 84992 >Category: bin >Synopsis: gcc4.x cleanup of usr.bin/hexdump >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue Aug 16 15:00:26 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Divacky Roman >Release: FreeBSD 7.0-CURRENT i386 >Organization: home >Environment: FreeBSD witten 7.0-CURRENT FreeBSD 7.0-CURRENT #55: Tue Aug 16 12:59:09 CEST 2005 root@witten:/usr/obj/usr/src/sys/NEOLOGISM i386 >Description: gcc4.x (tested with gcc41) cleanup of usr.bin/hexdump >How-To-Repeat: apply the patch >Fix: Index: conv.c =================================================================== RCS file: /home/ncvs/src/usr.bin/hexdump/conv.c,v retrieving revision 1.8 diff -u -r1.8 conv.c --- conv.c 16 Jul 2004 11:07:07 -0000 1.8 +++ conv.c 11 Aug 2005 13:22:00 -0000 @@ -103,7 +103,7 @@ if (odmode && MB_CUR_MAX > 1) { oclen = 0; retry: - clen = mbrtowc(&wc, p, bufsize, &pr->mbstate); + clen = mbrtowc(&wc, (const char *)p, bufsize, &pr->mbstate); if (clen == 0) clen = 1; else if (clen == (size_t)-1 || (clen == (size_t)-2 && @@ -118,7 +118,7 @@ * can complete it. */ oclen = bufsize; - bufsize = peek(p = peekbuf, MB_CUR_MAX); + bufsize = peek(p = (u_char *)peekbuf, MB_CUR_MAX); goto retry; } clen += oclen; Index: parse.c =================================================================== RCS file: /home/ncvs/src/usr.bin/hexdump/parse.c,v retrieving revision 1.13 diff -u -r1.13 parse.c --- parse.c 22 Jul 2004 13:14:42 -0000 1.13 +++ parse.c 11 Aug 2005 13:22:00 -0000 @@ -54,7 +54,7 @@ void addfile(char *name) { - unsigned char *p; + char *p; FILE *fp; int ch; char buf[2048 + 1]; @@ -79,7 +79,7 @@ void add(const char *fmt) { - unsigned const char *p, *savep; + const char *p, *savep; static FS **nextfs; FS *tfs; FU *tfu, **nextfu; @@ -156,7 +156,7 @@ { FU *fu; int bcnt, cursize; - unsigned char *fmt; + char *fmt; int prec; /* figure out the data block size needed for each format unit */ @@ -210,7 +210,7 @@ enum { NOTOKAY, USEBCNT, USEPREC } sokay; PR *pr, **nextpr; FU *fu; - unsigned char *p1, *p2, *fmtp; + char *p1, *p2, *fmtp; char savech, cs[3]; int nconv, prec; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508161451.j7GEpX1I014969>