Date: Fri, 11 Mar 2005 05:55:57 GMT From: "Pedro F. Giffuni" <giffunip@asme.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/78687: Warning cleanups for graphics/URT port Message-ID: <200503110555.j2B5tv15091266@www.freebsd.org> Resent-Message-ID: <200503110600.j2B60GKU000777@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 78687 >Category: ports >Synopsis: Warning cleanups for graphics/URT port >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Mar 11 06:00:16 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Pedro F. Giffuni >Release: 5.3-Release >Organization: >Environment: FreeBSD giffuni.etb.net.co 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Fri Nov 5 04:19:18 UTC 2004 root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: The Utah Raster Toolkit is a classic (like in old) application. The BRLCAD people include URT in their package and Lee Butler has made some cleanups in order to improve the build on IRIX. I have taken his patches and have done a few more cleanups. For now this is just a cleanup: it make it easier for me to follow the BRLCAD changes, in other words, there's no need to bump the port version yet. >How-To-Repeat: I should mention..I have patches to build support for the BRLCAD framebuffer but I prefer to wait until BRCAD can be built without OpenGL. >Fix: Patch follows: diff -ruN urt.orig/files/patch-cnv+gif2rle.c urt/files/patch-cnv+gif2rle.c --- urt.orig/files/patch-cnv+gif2rle.c Thu Jan 1 00:00:00 1970 +++ urt/files/patch-cnv+gif2rle.c Thu Mar 10 20:08:55 2005 @@ -0,0 +1,11 @@ +--- cnv/giftorle.c.orig Thu Mar 10 20:04:40 2005 ++++ cnv/giftorle.c Thu Mar 10 20:07:12 2005 +@@ -278,7 +278,7 @@ + max_code_size = 2*clear_code; + max_code = clear_code+2; + +- GetCode(fd,NULL,TRUE); ++ GetCode(fd,0,TRUE); + + fresh=TRUE; + diff -ruN urt.orig/files/patch-cnv+rletops.c urt/files/patch-cnv+rletops.c --- urt.orig/files/patch-cnv+rletops.c Thu Jan 1 00:00:00 1970 +++ urt/files/patch-cnv+rletops.c Thu Mar 10 23:17:59 2005 @@ -0,0 +1,30 @@ +--- cnv/rletops.c.orig Thu Mar 10 20:09:59 2005 ++++ cnv/rletops.c Thu Mar 10 20:13:29 2005 +@@ -74,7 +74,7 @@ + float heightinch = 3.0, + center = 3.25, + aspect = 1.0; +- int y, nrow, nscan, i, pix, dummy; ++ int nrow, nscan, i, pix, dummy; + float x1, y1, x2, y2, widthinch; + unsigned char ** scan; + unsigned char * buffer; +@@ -154,8 +154,7 @@ + y2 = y1 + heightinch; + prologue(outfile,sflag,nscan,nrow,x1,y1,x2,y2); + +- while ( (y = rle_getrow( &hdr, scan )) <= +- hdr.ymax ) ++ while ( ( rle_getrow( &hdr, scan )) <= hdr.ymax ) + { + if (gencps) { + /* generate a color line */ +@@ -231,7 +230,7 @@ + FILE *outfile; + unsigned char p; + { +- static npixo = 0; ++ static int npixo = 0; + static char tohex[] = "0123456789ABCDEF"; + + putc(tohex[(p>>4)&0xF],outfile); diff -ruN urt.orig/files/patch-cnv+rletorla.c urt/files/patch-cnv+rletorla.c --- urt.orig/files/patch-cnv+rletorla.c Thu Jan 1 00:00:00 1970 +++ urt/files/patch-cnv+rletorla.c Thu Mar 10 23:42:43 2005 @@ -0,0 +1,20 @@ +--- cnv/rletorla.c.orig Thu Mar 10 23:41:56 2005 ++++ cnv/rletorla.c Thu Mar 10 23:39:39 2005 +@@ -312,7 +312,7 @@ + U_CHAR *buf; + int *offset; + int width, height; +- int scan, x, y; ++ int scan, x; + short len; + long offptr; + /* +@@ -348,7 +348,7 @@ + exit(-1); + } + for (scan = 0; scan < height; scan++) { +- y = rle_getrow(&rle_dflt_hdr, scanline); ++ (void)rle_getrow(&rle_dflt_hdr, scanline); + switch (visual) { + case GRAYSCALE: /* 8 bits without colormap */ + red = scanline[0]; diff -ruN urt.orig/files/patch-cnv+rletovcr.c urt/files/patch-cnv+rletovcr.c --- urt.orig/files/patch-cnv+rletovcr.c Thu Jan 1 00:00:00 1970 +++ urt/files/patch-cnv+rletovcr.c Thu Mar 10 20:21:28 2005 @@ -0,0 +1,24 @@ +--- cnv/rletovcr.c.orig Thu Mar 10 20:17:23 2005 ++++ cnv/rletovcr.c Thu Mar 10 20:20:49 2005 +@@ -83,11 +83,10 @@ + static char COMMENT[80]; /* comment! */ + #endif + +-WriteVICARHeader(fd, width, height, BandsPerPixel) ++void WriteVICARHeader(fd, width, height, BandsPerPixel) + FILE *fd; + int width, height, BandsPerPixel; + { +- int pad; + char *buffer, *bp; + + /* +@@ -254,7 +253,7 @@ + int argc; + char *argv[]; + { +- char *infname = NULL, outfname = NULL; ++ char *infname = NULL, *outfname = NULL; + int oflag = 0; + unsigned char *VICARImage; + rle_hdr the_hdr; diff -ruN urt.orig/files/patch-cnv+vcrtorele.c urt/files/patch-cnv+vcrtorele.c --- urt.orig/files/patch-cnv+vcrtorele.c Thu Jan 1 00:00:00 1970 +++ urt/files/patch-cnv+vcrtorele.c Thu Mar 10 20:31:11 2005 @@ -0,0 +1,81 @@ +--- cnv/vcrtorle.c.orig Thu Mar 10 20:22:42 2005 ++++ cnv/vcrtorle.c Thu Mar 10 20:30:16 2005 +@@ -94,9 +94,6 @@ + + + static int VERBOSE = 0; +-static char *RoutineName; +- +-static long int VICARpos; /* Position in file for reading w/o fseek. */ + + static void FatalError(s) + char *s; +@@ -109,20 +106,10 @@ + static int LBLSIZE; /* size of header, must be int mult of NS */ + static char FORMAT[80]; /* 'BYTE' is OK */ + static char TYPE[80]; /* 'IMAGE' is OK */ +-static int BUFSIZe; /* integer multiple of NS ? */ +-static int DIM; /* == 3? */ +-static int EOL; /* == 0? */ +-static int RECSIZE; /* == LBLSIZE? */ + static char ORG[80]; /* `BSQ` is OK */ + static int NL; /* height */ + static int NS; /* width */ + static int NB; /* samples per pixel? */ +-static int N1; /* == NL? */ +-static int N2; /* == NS? */ +-static int N3; /* == NB? */ +-static int N4; /* 0 is OK */ +-static int NBB; /* 0 is OK */ +-static int NLB; /* 0 is OK */ + static char HOST[80]; /* machine type? */ + static char INTFMT[80]; /* integer format? */ + static char REALFMT[80]; /* real format? */ +@@ -218,20 +205,20 @@ + + if (0 == strcmp("FORMAT" ,Name)) {strcpy(FORMAT ,Value); continue;} + if (0 == strcmp("TYPE" ,Name)) {strcpy(TYPE ,Value); continue;} +- if (0 == strcmp("BUFSIZ" ,Name)) {BUFSIZe = atoi(Value); continue;} +- if (0 == strcmp("DIM" ,Name)) {DIM = atoi(Value); continue;} +- if (0 == strcmp("EOL" ,Name)) {EOL = atoi(Value); continue;} +- if (0 == strcmp("RECSIZE",Name)) {RECSIZE = atoi(Value); continue;} ++ if (0 == strcmp("BUFSIZ" ,Name)) { (void) atoi(Value); continue;} ++ if (0 == strcmp("DIM" ,Name)) { (void) atoi(Value); continue;} ++ if (0 == strcmp("EOL" ,Name)) { (void) atoi(Value); continue;} ++ if (0 == strcmp("RECSIZE",Name)) { (void) atoi(Value); continue;} + if (0 == strcmp("ORG" ,Name)) {strcpy(ORG ,Value); continue;} + if (0 == strcmp("NL" ,Name)) {NL = atoi(Value); continue;} + if (0 == strcmp("NS" ,Name)) {NS = atoi(Value); continue;} + if (0 == strcmp("NB" ,Name)) {NB = atoi(Value); continue;} +- if (0 == strcmp("N1" ,Name)) {N1 = atoi(Value); continue;} +- if (0 == strcmp("N2" ,Name)) {N2 = atoi(Value); continue;} +- if (0 == strcmp("N3" ,Name)) {N3 = atoi(Value); continue;} +- if (0 == strcmp("N4" ,Name)) {N4 = atoi(Value); continue;} +- if (0 == strcmp("NBB" ,Name)) {NBB = atoi(Value); continue;} +- if (0 == strcmp("NLB" ,Name)) {NLB = atoi(Value); continue;} ++ if (0 == strcmp("N1" ,Name)) { (void) atoi(Value); continue;} ++ if (0 == strcmp("N2" ,Name)) { (void) atoi(Value); continue;} ++ if (0 == strcmp("N3" ,Name)) { (void) atoi(Value); continue;} ++ if (0 == strcmp("N4" ,Name)) { (void) atoi(Value); continue;} ++ if (0 == strcmp("NBB" ,Name)) { (void) atoi(Value); continue;} ++ if (0 == strcmp("NLB" ,Name)) { (void) atoi(Value); continue;} + if (0 == strcmp("HOST" ,Name)) {strcpy(HOST ,Value); continue;} + if (0 == strcmp("INTFMT" ,Name)) {strcpy(INTFMT ,Value); continue;} + if (0 == strcmp("REALFMT",Name)) {strcpy(REALFMT,Value); continue;} +@@ -249,7 +236,6 @@ + n++; + } + +- VICARpos = n; + } + + /* RLE stuff */ +@@ -297,7 +283,7 @@ + unsigned char *VICARImage; + char *outfname = NULL; + int oflag = 0; +- int x,y,z; ++ int y; + long int nread; + rle_hdr the_hdr; + rle_pixel **rows; diff -ruN urt.orig/files/patch-config::urt urt/files/patch-config::urt --- urt.orig/files/patch-config::urt Thu Jan 13 09:34:42 2005 +++ urt/files/patch-config::urt Thu Mar 10 23:53:34 2005 @@ -1,5 +1,5 @@ --- config/urt.orig Wed Jul 15 19:47:15 1992 -+++ config/urt Wed Jan 12 17:22:42 2005 ++++ config/urt Thu Mar 10 23:52:07 2005 @@ -1,3 +1,7 @@ +# Configuration for HP 9000/300 series running BSD4.3 + @@ -40,15 +40,7 @@ ##define HPUX300CC HP 9000/300 running HP-UX. ##define HPUX800CC HP 9000/800 running HP-UX. ##define IBMR6000CC IBM RS6000. -@@ -70,14 +74,14 @@ - ##define 386IXCC SVr3 386/ix 2.2 - - # You can put any system dependent flags here. --ExtraCFLAGS = -+ExtraCFLAGS = - - # System specific or configuration parameters. Define according to your - # environment and desires. +@@ -77,7 +81,7 @@ ##define ABEKAS_PAL Convert to PAL format in Abekas A60 tool. ##define ALL_MAN Print/install all man pages. @@ -127,7 +119,7 @@ #ifdef FB -LIBFB = /usr/brl/lib/libfb.a -+LIBFB = $(LOCALBASE)/lib/libfb.a ++LIBFB = $(LOCALBASE)/share/brlcad/lib/libfb.a $(LOCALBASE)/brlcad/lib/libpkg.a #endif #ifdef GRINNELL diff -ruN urt.orig/files/patch-get+getfb.c urt/files/patch-get+getfb.c --- urt.orig/files/patch-get+getfb.c Thu Jan 1 00:00:00 1970 +++ urt/files/patch-get+getfb.c Mon Mar 7 23:51:21 2005 @@ -0,0 +1,11 @@ +--- get/getfb.c.orig Mon Mar 7 23:33:32 2005 ++++ get/getfb.c Mon Mar 7 23:44:28 2005 +@@ -47,7 +47,7 @@ + } + + rle_file = argv[0]; +- rle_names( &hdr, hdr.cmd, rle_file ); ++ rle_names( &hdr, hdr.cmd, rle_file, 0 ); + hdr.rle_file = rle_open_f(hdr.cmd, rle_file, "r"); + if( rle_get_setup( &hdr ) < 0 ) { + fprintf(stderr, "getfb: Error reading setup information\n"); diff -ruN urt.orig/files/patch-get+getx11+XGetHClrs.c urt/files/patch-get+getx11+XGetHClrs.c --- urt.orig/files/patch-get+getx11+XGetHClrs.c Thu Jan 1 00:00:00 1970 +++ urt/files/patch-get+getx11+XGetHClrs.c Sun Jan 30 15:51:08 2005 @@ -0,0 +1,8 @@ +--- get/getx11/XGetHClrs.c.orig Sun Jan 30 15:48:57 2005 ++++ get/getx11/XGetHClrs.c Sun Jan 30 15:49:38 2005 +@@ -1,5 +1,4 @@ + #ifndef XLIBINT_H_NOT_AVAILABLE +-#include <X11/copyright.h> + + /* $XConsortium: XGetHClrs.c,v 11.10 88/09/06 16:07:50 martin Exp $ */ + /* Copyright Massachusetts Institute of Technology 1986 */ diff -ruN urt.orig/files/patch-get+makefile.src urt/files/patch-get+makefile.src --- urt.orig/files/patch-get+makefile.src Thu Jan 1 00:00:00 1970 +++ urt/files/patch-get+makefile.src Tue Mar 8 00:10:30 2005 @@ -0,0 +1,11 @@ +--- get/makefile.src.orig Thu Feb 27 21:13:33 1992 ++++ get/makefile.src Tue Mar 8 00:10:02 2005 +@@ -54,7 +54,7 @@ + #ifdef FB + # getfb - get to a BRL libfb display + #@getfb.out: getfb.c +-#@ $(CC) $(CFLAGS) $*.c $(LIBS) $(LIBFB) -lm -o $*.new ++#@ $(CC) $(CFLAGS) $(INCFB) $*.c $(LIBS) $(LIBFB) $(LIBX11) -lm -o $*.new + #@ mv $*.new $@ + #endif + diff -ruN urt.orig/files/patch-get::getx11::XGetHClrs.c urt/files/patch-get::getx11::XGetHClrs.c --- urt.orig/files/patch-get::getx11::XGetHClrs.c Thu Jan 13 09:34:42 2005 +++ urt/files/patch-get::getx11::XGetHClrs.c Thu Jan 1 00:00:00 1970 @@ -1,8 +0,0 @@ ---- get/getx11/XGetHClrs.c.orig Wed Jan 12 17:03:11 2005 -+++ get/getx11/XGetHClrs.c Wed Jan 12 17:06:40 2005 -@@ -1,5 +1,4 @@ - #ifndef XLIBINT_H_NOT_AVAILABLE --#include <X11/copyright.h> - - /* $XConsortium: XGetHClrs.c,v 11.10 88/09/06 16:07:50 martin Exp $ */ - /* Copyright Massachusetts Institute of Technology 1986 */ diff -ruN urt.orig/files/patch-lib+inv_cmap.c urt/files/patch-lib+inv_cmap.c --- urt.orig/files/patch-lib+inv_cmap.c Thu Jan 1 00:00:00 1970 +++ urt/files/patch-lib+inv_cmap.c Thu Mar 10 21:29:51 2005 @@ -0,0 +1,11 @@ +--- lib/inv_cmap.c.orig Thu Mar 10 21:28:37 2005 ++++ lib/inv_cmap.c Thu Mar 10 21:29:06 2005 +@@ -42,7 +42,7 @@ + static long cbinc, cginc, crinc; + static unsigned long *gdp, *rdp, *cdp; + static unsigned char *grgbp, *rrgbp, *crgbp; +-static gstride, rstride; ++static int gstride, rstride; + static long x, xsqr, colormax; + static int cindex; + #ifdef INSTRUMENT_IT diff -ruN urt.orig/files/patch-lib::scanargs.c urt/files/patch-lib::scanargs.c --- urt.orig/files/patch-lib::scanargs.c Thu Jan 1 00:00:00 1970 +++ urt/files/patch-lib::scanargs.c Thu Mar 10 21:26:32 2005 @@ -0,0 +1,15 @@ +--- lib/scanargs.c.orig Thu Mar 10 21:23:06 2005 ++++ lib/scanargs.c Thu Mar 10 21:25:26 2005 +@@ -128,10 +128,10 @@ + va_list argl; + { + +- register check; /* check counter to be sure all argvs ++ register int check; /* check counter to be sure all argvs + are processed */ + register CONST_DECL char *cp; +- register cnt; ++ register int cnt; + int optarg = 0; /* where optional args start */ + int nopt = 0; + char tmpflg, /* temp flag */ diff -ruN urt.orig/files/patch-tools+avg4.c urt/files/patch-tools+avg4.c --- urt.orig/files/patch-tools+avg4.c Thu Jan 1 00:00:00 1970 +++ urt/files/patch-tools+avg4.c Thu Mar 10 20:49:21 2005 @@ -0,0 +1,11 @@ +--- tools/avg4.c.orig Thu Mar 10 20:47:48 2005 ++++ tools/avg4.c Thu Mar 10 20:48:11 2005 +@@ -34,7 +34,7 @@ + #include <stdio.h> + #include "rle.h" + +-static bit_count[16] = {0, 63, 63, 127, 63, 127, 127, ++static int bit_count[16] = {0, 63, 63, 127, 63, 127, 127, + 192, 63, 127, 127, 192, 127, 192, 192, 255}; + + void diff -ruN urt.orig/files/patch-tools+mcut.c urt/files/patch-tools+mcut.c --- urt.orig/files/patch-tools+mcut.c Thu Jan 1 00:00:00 1970 +++ urt/files/patch-tools+mcut.c Thu Mar 10 20:57:16 2005 @@ -0,0 +1,20 @@ +--- tools/mcut.c.orig Thu Mar 10 20:54:44 2005 ++++ tools/mcut.c Thu Mar 10 20:56:44 2005 +@@ -791,7 +791,7 @@ + TRACE( tmp_cb, cb_list ) + { + register color_t *newcol = &tmp_cb->color; +- register newdist = DISTANCE( ref_col, *newcol ); ++ register int newdist = DISTANCE( ref_col, *newcol ); + + if ( newdist < dist ) + { +@@ -963,7 +963,7 @@ + cmp_radices ( h1, h2 ) + histogram_t **h1, **h2; + { +- register c1 = -1, c2 = -1; ++ register int c1 = -1, c2 = -1; + + if ( *h1 ) + c1 = (*h1)->color & mask; diff -ruN urt.orig/files/patch-tools+mergechan.c urt/files/patch-tools+mergechan.c --- urt.orig/files/patch-tools+mergechan.c Thu Jan 1 00:00:00 1970 +++ urt/files/patch-tools+mergechan.c Thu Mar 10 21:01:11 2005 @@ -0,0 +1,11 @@ +--- tools/mergechan.c.orig Thu Mar 10 20:58:34 2005 ++++ tools/mergechan.c Thu Mar 10 21:00:31 2005 +@@ -79,7 +79,7 @@ + { + fprintf( stderr, + "%s: Images %d and %d are both from the standard input\n", +- stdin_used, i ); ++ argv[0], stdin_used, i ); + exit( -1 ); + } + } diff -ruN urt.orig/files/patch-tools+rlegrid.c urt/files/patch-tools+rlegrid.c --- urt.orig/files/patch-tools+rlegrid.c Thu Jan 1 00:00:00 1970 +++ urt/files/patch-tools+rlegrid.c Thu Mar 10 21:04:11 2005 @@ -0,0 +1,19 @@ +--- tools/rlegrid.c.orig Thu Mar 10 21:01:59 2005 ++++ tools/rlegrid.c Thu Mar 10 21:03:02 2005 +@@ -65,7 +65,7 @@ + rle_op **scanraw[2]; /* space for two raw scanline buffers */ + rle_op *p, *q; + int *nrawp[2]; +- unsigned char fg, bg; ++ unsigned char fg; + + out_hdr = *rle_hdr_init( NULL ); + +@@ -81,7 +81,6 @@ + exit( 1 ); + + fg = fg_color; +- bg = bg_color; + + outfile = rle_open_f( cmd_name( argv ), outfname, "w" ); + diff -ruN urt.orig/files/patch-tools+rlehdr.c urt/files/patch-tools+rlehdr.c --- urt.orig/files/patch-tools+rlehdr.c Thu Jan 1 00:00:00 1970 +++ urt/files/patch-tools+rlehdr.c Thu Mar 10 21:13:49 2005 @@ -0,0 +1,11 @@ +--- tools/rlehdr.c.orig Thu Mar 10 21:04:49 2005 ++++ tools/rlehdr.c Thu Mar 10 21:13:14 2005 +@@ -289,7 +289,7 @@ + { + if ( (cp = index( the_comment, '\n' )) ) + printf( ", %s=%.*s", *comment_names, +- cp - the_comment - 1, the_comment ); ++ *comment_names,cp - the_comment - 1, the_comment ); + else + printf( ", %s=%s", *comment_names, the_comment ); + break; diff -ruN urt.orig/files/patch-tools+rleinterp.c urt/files/patch-tools+rleinterp.c --- urt.orig/files/patch-tools+rleinterp.c Thu Jan 1 00:00:00 1970 +++ urt/files/patch-tools+rleinterp.c Thu Mar 10 21:16:41 2005 @@ -0,0 +1,13 @@ +--- tools/rleinterp.c.orig Thu Mar 10 21:14:52 2005 ++++ tools/rleinterp.c Thu Mar 10 21:15:40 2005 +@@ -48,8 +48,8 @@ + nom_sortie[BUFSIZ], + extension[80] , + *basenom, *rep ; +- int i, ni, n, nbimage=1; +- int rle_err, width, y, x ; ++ int i, n, nbimage=1; ++ int width, y, x ; + int iflag1 = 0 , iflag2 = 0, oflag = 0, fd ; + double alpha, beta ; + FILE * outfile; diff -ruN urt.orig/files/patch-tools+rlepatch.c urt/files/patch-tools+rlepatch.c --- urt.orig/files/patch-tools+rlepatch.c Thu Jan 1 00:00:00 1970 +++ urt/files/patch-tools+rlepatch.c Thu Mar 10 21:20:23 2005 @@ -0,0 +1,20 @@ +--- tools/rlepatch.c.orig Thu Mar 10 21:17:33 2005 ++++ tools/rlepatch.c Thu Mar 10 21:18:56 2005 +@@ -46,7 +46,7 @@ + rle_pixel ** im_rows, **patch_rows, ** outrows; + int stdin_used = 0; + int patches = 0, oflag = 0, i, y, c, xlen, width; +- int rle_cnt, rle_err; ++ int rle_cnt; + + im_hdr = *rle_hdr_init( NULL ); + out_hdr = *rle_hdr_init( NULL ); +@@ -86,7 +86,7 @@ + } + + for ( rle_cnt = 0; +- (rle_err = rle_get_setup( &im_hdr )) == RLE_SUCCESS; ++ rle_get_setup( &im_hdr ) == RLE_SUCCESS; + rle_cnt++ ) + { + /* Get the patch files set up */ >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503110555.j2B5tv15091266>