Revision: 41833
http://brlcad.svn.sourceforge.net/brlcad/?rev=41833&view=rev
Author: brlcad
Date: 2010-12-29 07:34:30 +0000 (Wed, 29 Dec 2010)
Log Message:
-----------
quell remainder of verbose compilation warnings on 64-bit linux. fixed
signed/unsigned comparisons and floating point equality tests.
Modified Paths:
--------------
brlcad/trunk/src/util/dsp_add.c
brlcad/trunk/src/util/pix-png.c
Modified: brlcad/trunk/src/util/dsp_add.c
===================================================================
--- brlcad/trunk/src/util/dsp_add.c 2010-12-29 07:22:13 UTC (rev 41832)
+++ brlcad/trunk/src/util/dsp_add.c 2010-12-29 07:34:30 UTC (rev 41833)
@@ -175,7 +175,7 @@
int next_arg;
FILE *in1, *in2;
unsigned short *buf1, *buf2;
- unsigned long count;
+ size_t count;
int in_cookie, out_cookie;
int conv;
struct stat sb;
@@ -195,7 +195,7 @@
return -1;
}
- count = (unsigned long)sb.st_size;
+ count = sb.st_size;
buf1 = bu_malloc((size_t)sb.st_size, "buf1");
next_arg++;
@@ -206,7 +206,7 @@
return -1;
}
- if (sb.st_size != count)
+ if ((size_t)sb.st_size != count)
bu_exit(EXIT_FAILURE, "**** ERROR **** file size mis-match\n");
buf2 = bu_malloc((size_t)sb.st_size, "buf2");
Modified: brlcad/trunk/src/util/pix-png.c
===================================================================
--- brlcad/trunk/src/util/pix-png.c 2010-12-29 07:22:13 UTC (rev 41832)
+++ brlcad/trunk/src/util/pix-png.c 2010-12-29 07:34:30 UTC (rev 41833)
@@ -62,7 +62,7 @@
int
-get_args(int argc, char **argv, long *width, long *height, FILE **infp, FILE
**outfp)
+get_args(int argc, char **argv, size_t *width, size_t *height, FILE **infp,
FILE **outfp)
{
int c;
@@ -179,8 +179,8 @@
int
main(int argc, char *argv[])
{
- int i;
- unsigned long int w, h;
+ size_t i;
+ size_t w, h;
unsigned char *scanbuf;
unsigned char **rows;
struct stat sb;
@@ -188,8 +188,8 @@
FILE *infp = (FILE *)NULL;
FILE *outfp = (FILE *)NULL;
- long int file_width = 512L; /* default input width */
- long int file_height = 512L; /* default input height */
+ size_t file_width = 512; /* default input width */
+ size_t file_height = 512; /* default input height */
char usage[] = "Usage: pix-png [-a] [-w file_width] [-n file_height]\n\
[-s square_file_size] [-o file.png] [file.pix] [> file.png]\n";
@@ -210,8 +210,8 @@
/* autosize input? */
if (fileinput && autosize) {
if (fb_common_file_size(&w, &h, file_name, 3)) {
- file_width = (long)w;
- file_height = (long)h;
+ file_width = w;
+ file_height = h;
} else {
bu_log("%s: unable to autosize\n", bu_getprogname());
}
@@ -234,7 +234,7 @@
perror("unable to stat file:");
bu_exit(1, "ERROR: %s cannot proceed.", bu_getprogname());
}
- if (SIZE * sizeof(unsigned char) < sb.st_size) {
+ if (SIZE * sizeof(unsigned char) < (size_t)sb.st_size) {
bu_log("WARNING: Output PNG image dimensions are smaller than the PIX
input image\n");
bu_log("Input image is %lu pixels, output image is %ld pixels\n",
(unsigned long)sb.st_size / 3, SIZE * sizeof(unsigned char) / 3);
if (fb_common_file_size(&w, &h, file_name, 3)) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits