Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Build break on amd64 - nand/nand.c



Diffs attached should fix this.

On Fri, 2 Nov 2012, Paul Goyette wrote:

--- nand.o ---
cc1: warnings being treated as errors
/build/netbsd-local/src/sys/dev/nand/nand.c: In function 'nand_default_read_page': /build/netbsd-local/src/sys/dev/nand/nand.c:730:8: error: format '%u' expects type 'unsigned int', but argument 4 has type 'size_t' /build/netbsd-local/src/sys/dev/nand/nand.c:735:8: error: format '%u' expects type 'unsigned int', but argument 4 has type 'size_t' /build/netbsd-local/src/sys/dev/nand/nand.c:741:8: error: format '%u' expects type 'unsigned int', but argument 4 has type 'size_t' /build/netbsd-local/src/sys/dev/nand/nand.c: In function 'nand_flash_write_unaligned': /build/netbsd-local/src/sys/dev/nand/nand.c:1157:9: error: format '%u' expects type 'unsigned int', but argument 2 has type 'size_t' /build/netbsd-local/src/sys/dev/nand/nand.c:1157:9: error: format '%u' expects type 'unsigned int', but argument 4 has type 'size_t'

Isn't there a %z format for printing size_t's?



-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------

!DSPAM:50941ca019111234514069!



-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------
Index: nand.c
===================================================================
RCS file: /cvsroot/src/sys/dev/nand/nand.c,v
retrieving revision 1.19
diff -u -p -r1.19 nand.c
--- nand.c      2 Nov 2012 17:14:41 -0000       1.19
+++ nand.c      2 Nov 2012 19:23:43 -0000
@@ -727,18 +727,18 @@ nand_default_read_page(device_t self, si
                case NAND_ECC_CORRECTED:
                        aprint_error_dev(self,
                            "data corrected with ECC at page offset 0x%jx "
-                           "block %" PRIu32 "\n", (uintmax_t)offset, b);
+                           "block %z\n", (uintmax_t)offset, b);
                        break;
                case NAND_ECC_TWOBIT:
                        aprint_error_dev(self,
                            "uncorrectable ECC error at page offset 0x%jx "
-                           "block %" PRIu32 "\n", (uintmax_t)offset, b);
+                           "block %z\n", (uintmax_t)offset, b);
                        return EIO;
                        break;
                case NAND_ECC_INVALID:
                        aprint_error_dev(self,
                            "invalid ECC in oob at page offset 0x%jx "
-                           "block %" PRIu32 "\n", (uintmax_t)offset, b);
+                           "block %z\n", (uintmax_t)offset, b);
                        return EIO;
                        break;
                default:
@@ -1153,7 +1153,7 @@ nand_flash_write_unaligned(device_t self
                } else {
                        /* XXX debug */
                        if (left > chip->nc_page_size) {
-                               printf("left: %" PRIu32 ", i: %d, count: %" 
PRIu32 "\n",
+                               printf("left: %z, i: %d, count: %z\n",
                                    left, i, count);
                        }
                        KASSERT(left > chip->nc_page_size);


Home | Main Index | Thread Index | Old Index