Module Name: src Committed By: christos Date: Fri Mar 14 00:06:52 UTC 2014
Modified Files: src/external/bsd/pcc/dist/pcc/arch/amd64: local2.c src/external/bsd/pcc/dist/pcc/cc/ccom: gcc_compat.c main.c trees.c src/external/bsd/pcc/dist/pcc/cc/cpp: cpp.c src/external/bsd/pcc/dist/pcc/mip: optim2.c src/external/bsd/pcc/libexec/ccom: Makefile Log Message: make this compile again To generate a diff of this commit: cvs rdiff -u -r1.1.1.4 -r1.2 \ src/external/bsd/pcc/dist/pcc/arch/amd64/local2.c cvs rdiff -u -r1.3 -r1.4 src/external/bsd/pcc/dist/pcc/cc/ccom/gcc_compat.c cvs rdiff -u -r1.1.1.5 -r1.2 src/external/bsd/pcc/dist/pcc/cc/ccom/main.c \ src/external/bsd/pcc/dist/pcc/cc/ccom/trees.c cvs rdiff -u -r1.1.1.5 -r1.2 src/external/bsd/pcc/dist/pcc/cc/cpp/cpp.c cvs rdiff -u -r1.1.1.4 -r1.2 src/external/bsd/pcc/dist/pcc/mip/optim2.c cvs rdiff -u -r1.11 -r1.12 src/external/bsd/pcc/libexec/ccom/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/bsd/pcc/dist/pcc/arch/amd64/local2.c diff -u src/external/bsd/pcc/dist/pcc/arch/amd64/local2.c:1.1.1.4 src/external/bsd/pcc/dist/pcc/arch/amd64/local2.c:1.2 --- src/external/bsd/pcc/dist/pcc/arch/amd64/local2.c:1.1.1.4 Wed Jan 11 15:32:40 2012 +++ src/external/bsd/pcc/dist/pcc/arch/amd64/local2.c Thu Mar 13 20:06:52 2014 @@ -1,5 +1,5 @@ /* Id: local2.c,v 1.49 2011/09/21 21:23:09 plunky Exp */ -/* $NetBSD: local2.c,v 1.1.1.4 2012/01/11 20:32:40 plunky Exp $ */ +/* $NetBSD: local2.c,v 1.2 2014/03/14 00:06:52 christos Exp $ */ /* * Copyright (c) 2008 Michael Shalayeff * Copyright (c) 2003 Anders Magnusson (ra...@ludd.luth.se). @@ -321,7 +321,7 @@ ultofd(NODE *p) static void ldtoul(NODE *p) { - int r; + int r __unused; r = getlr(p, '1')->n_rval; Index: src/external/bsd/pcc/dist/pcc/cc/ccom/gcc_compat.c diff -u src/external/bsd/pcc/dist/pcc/cc/ccom/gcc_compat.c:1.3 src/external/bsd/pcc/dist/pcc/cc/ccom/gcc_compat.c:1.4 --- src/external/bsd/pcc/dist/pcc/cc/ccom/gcc_compat.c:1.3 Mon Mar 26 10:30:46 2012 +++ src/external/bsd/pcc/dist/pcc/cc/ccom/gcc_compat.c Thu Mar 13 20:06:52 2014 @@ -1,5 +1,5 @@ /* Id: gcc_compat.c,v 1.83 2012/03/22 18:04:41 plunky Exp */ -/* $NetBSD: gcc_compat.c,v 1.3 2012/03/26 14:30:46 plunky Exp $ */ +/* $NetBSD: gcc_compat.c,v 1.4 2014/03/14 00:06:52 christos Exp $ */ /* * Copyright (c) 2004 Anders Magnusson (ra...@ludd.luth.se). * All rights reserved. @@ -551,6 +551,7 @@ pragmas_gcc(char *t) return 0; } *t = u; + __USE(ign); } else if (strcmp(t, "poison") == 0) { /* currently ignore */; } else if (strcmp(t, "visibility") == 0) { Index: src/external/bsd/pcc/dist/pcc/cc/ccom/main.c diff -u src/external/bsd/pcc/dist/pcc/cc/ccom/main.c:1.1.1.5 src/external/bsd/pcc/dist/pcc/cc/ccom/main.c:1.2 --- src/external/bsd/pcc/dist/pcc/cc/ccom/main.c:1.1.1.5 Mon Mar 26 10:26:49 2012 +++ src/external/bsd/pcc/dist/pcc/cc/ccom/main.c Thu Mar 13 20:06:52 2014 @@ -1,5 +1,5 @@ /* Id: main.c,v 1.118 2012/03/22 18:51:40 plunky Exp */ -/* $NetBSD: main.c,v 1.1.1.5 2012/03/26 14:26:49 plunky Exp $ */ +/* $NetBSD: main.c,v 1.2 2014/03/14 00:06:52 christos Exp $ */ /* * Copyright (c) 2002 Anders Magnusson. All rights reserved. @@ -65,11 +65,9 @@ static void segvcatch(int a) { char buf[1024]; - int dummy; - snprintf(buf, sizeof buf, "%sinternal compiler error: %s, line %d\n", nerrors ? "" : "major ", ftitle, lineno); - dummy = write(STDERR_FILENO, buf, strlen(buf)); + (void)write(STDERR_FILENO, buf, strlen(buf)); _exit(1); } Index: src/external/bsd/pcc/dist/pcc/cc/ccom/trees.c diff -u src/external/bsd/pcc/dist/pcc/cc/ccom/trees.c:1.1.1.5 src/external/bsd/pcc/dist/pcc/cc/ccom/trees.c:1.2 --- src/external/bsd/pcc/dist/pcc/cc/ccom/trees.c:1.1.1.5 Mon Mar 26 10:26:54 2012 +++ src/external/bsd/pcc/dist/pcc/cc/ccom/trees.c Thu Mar 13 20:06:52 2014 @@ -1,5 +1,5 @@ /* Id: trees.c,v 1.306 2012/03/22 18:51:40 plunky Exp */ -/* $NetBSD: trees.c,v 1.1.1.5 2012/03/26 14:26:54 plunky Exp $ */ +/* $NetBSD: trees.c,v 1.2 2014/03/14 00:06:52 christos Exp $ */ /* * Copyright (c) 2003 Anders Magnusson (ra...@ludd.luth.se). * All rights reserved. @@ -2430,9 +2430,8 @@ static NODE * wrualfld(NODE *val, NODE *d, TWORD t, TWORD ct, int off, int fsz) { NODE *p, *q, *r, *rn, *s; - int tsz, ctsz, t2f, inbits; + int ctsz, t2f, inbits; - tsz = (int)tsize(t, 0, 0); ctsz = (int)tsize(ct, 0, 0); ct = ENUNSIGN(ct); @@ -2504,16 +2503,14 @@ wrualfld(NODE *val, NODE *d, TWORD t, TW static NODE * rmfldops(NODE *p) { - CONSZ msk; TWORD t, ct; NODE *q, *r, *t1, *t2, *bt, *t3, *t4; - int fsz, foff, tsz; + int fsz, foff; if (p->n_op == FLD) { /* Rewrite a field read operation */ fsz = UPKFSZ(p->n_rval); foff = UPKFOFF(p->n_rval); - tsz = (int)tsize(p->n_left->n_type, 0, 0); q = buildtree(ADDROF, p->n_left, NIL); ct = t = p->n_type; @@ -2542,11 +2539,9 @@ rmfldops(NODE *p) fsz = UPKFSZ(q->n_rval); foff = UPKFOFF(q->n_rval); t = q->n_left->n_type; - tsz = (int)tsize(t, 0, 0); #if TARGET_ENDIAN == TARGET_BE foff = tsz - fsz - foff; #endif - msk = (((1LL << (fsz-1))-1) << 1) | 1; bt = NULL; if (p->n_right->n_op != ICON && p->n_right->n_op != NAME) { t2 = tempnode(0, p->n_right->n_type, 0, 0); Index: src/external/bsd/pcc/dist/pcc/cc/cpp/cpp.c diff -u src/external/bsd/pcc/dist/pcc/cc/cpp/cpp.c:1.1.1.5 src/external/bsd/pcc/dist/pcc/cc/cpp/cpp.c:1.2 --- src/external/bsd/pcc/dist/pcc/cc/cpp/cpp.c:1.1.1.5 Wed Jan 11 15:33:06 2012 +++ src/external/bsd/pcc/dist/pcc/cc/cpp/cpp.c Thu Mar 13 20:06:52 2014 @@ -1,5 +1,5 @@ /* Id: cpp.c,v 1.145 2011/09/27 08:22:55 plunky Exp */ -/* $NetBSD: cpp.c,v 1.1.1.5 2012/01/11 20:33:06 plunky Exp $ */ +/* $NetBSD: cpp.c,v 1.2 2014/03/14 00:06:52 christos Exp $ */ /* * Copyright (c) 2004,2010 Anders Magnusson (ra...@ludd.luth.se). @@ -908,7 +908,6 @@ xwarning(usch *s) { usch *t; usch *sb = stringbuf; - int dummy; flbuf(); savch(0); @@ -916,8 +915,8 @@ xwarning(usch *s) t = sheap("%s:%d: warning: ", ifiles->fname, ifiles->lineno); write (2, t, strlen((char *)t)); } - dummy = write (2, s, strlen((char *)s)); - dummy = write (2, "\n", 1); + (void)write (2, s, strlen((char *)s)); + (void)write (2, "\n", 1); stringbuf = sb; } @@ -925,16 +924,15 @@ void xerror(usch *s) { usch *t; - int dummy; flbuf(); savch(0); if (ifiles != NULL) { t = sheap("%s:%d: error: ", ifiles->fname, ifiles->lineno); - dummy = write (2, t, strlen((char *)t)); + (void)write (2, t, strlen((char *)t)); } - dummy = write (2, s, strlen((char *)s)); - dummy = write (2, "\n", 1); + (void)write (2, s, strlen((char *)s)); + (void)write (2, "\n", 1); exit(1); } Index: src/external/bsd/pcc/dist/pcc/mip/optim2.c diff -u src/external/bsd/pcc/dist/pcc/mip/optim2.c:1.1.1.4 src/external/bsd/pcc/dist/pcc/mip/optim2.c:1.2 --- src/external/bsd/pcc/dist/pcc/mip/optim2.c:1.1.1.4 Thu Sep 1 08:47:14 2011 +++ src/external/bsd/pcc/dist/pcc/mip/optim2.c Thu Mar 13 20:06:52 2014 @@ -1,5 +1,5 @@ /* Id: optim2.c,v 1.82 2011/08/16 06:14:16 ragge Exp */ -/* $NetBSD: optim2.c,v 1.1.1.4 2011/09/01 12:47:14 plunky Exp $ */ +/* $NetBSD: optim2.c,v 1.2 2014/03/14 00:06:52 christos Exp $ */ /* * Copyright (c) 2004 Anders Magnusson (ra...@ludd.luth.se). * All rights reserved. @@ -1871,12 +1871,11 @@ void TraceSchedule(struct p2env* p2e) struct block_map* map ; unsigned long block_count = count_blocks(p2e); unsigned long i ; - unsigned long threads; struct interpass *front, *back ; map = tmpalloc(block_count * sizeof(struct block_map)); - threads = map_blocks(p2e, map, block_count) ; + (void)map_blocks(p2e, map, block_count) ; back = map[0].block->last ; for (i=1; i < block_count; i++) { Index: src/external/bsd/pcc/libexec/ccom/Makefile diff -u src/external/bsd/pcc/libexec/ccom/Makefile:1.11 src/external/bsd/pcc/libexec/ccom/Makefile:1.12 --- src/external/bsd/pcc/libexec/ccom/Makefile:1.11 Thu Sep 1 09:00:14 2011 +++ src/external/bsd/pcc/libexec/ccom/Makefile Thu Mar 13 20:06:52 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2011/09/01 13:00:14 plunky Exp $ +# $NetBSD: Makefile,v 1.12 2014/03/14 00:06:52 christos Exp $ WARNS?= 2 @@ -32,7 +32,7 @@ COPTS.pftn.c+= -Wno-uninitialized DPSRCS= external.c -MKEXTDIR!= cd ../mkext && ${PRINTOBJDIR} +MKEXTDIR!= cd ${.CURDIR}/../mkext && ${PRINTOBJDIR} external.c: ${MKEXTDIR}/mkext ${_MKTARGET_CREATE}