-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tim Kientzle wrote: > Author: kientzle > Date: Wed Nov 5 05:26:11 2008 > New Revision: 184668 > URL: http://svn.freebsd.org/changeset/base/184668 > > Log: > Fix compile warnings building on amd64. This is modified slightly > from Jaakko's original patch: I have misgivings about the portability > of the 'z' printf modifier so opted to cast the arguments to (int) > instead. > > PR: bin/128561 > Submitted by: Jaakko Heinonen > MFC after: 30 days > [...] > @@ -494,7 +494,8 @@ test_assert_empty_file(const char *f1fmt > if (fd < 0) { > fprintf(stderr, " Unable to open %s\n", f1); > } else { > - s = sizeof(buff) < st.st_size ? sizeof(buff) : st.st_size; > + s = (sizeof(buff) < (size_t)st.st_size) ? > + (ssize_t)sizeof(buff) : (ssize_t)st.st_size;
I'm more or less concerned about this - st_size is off_t, is it safe to cast it to size_t when comparing here? > s = read(fd, buff, s); > hexdump(buff, NULL, s, 0); > } > - -- Xin LI <[EMAIL PROTECTED]> http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkRM7AACgkQi+vbBBjt66D/YwCgqm9Do0SwckV4Da86gEyU4Yk8 AXMAni2tF+SzEObjliVy1z03irw7Qd6g =M8sh -----END PGP SIGNATURE----- _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[EMAIL PROTECTED]"