Fix build warning.
authorGünther Deschner <gd@samba.org>
Tue, 29 Jan 2008 22:53:49 +0000 (23:53 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 29 Jan 2008 22:53:49 +0000 (23:53 +0100)
Guenther

source/tdb/common/io.c

index 01ada7647b96ec314bcb32311fbeb0fc20967094..4b7e33ab65992fee9cf1611338084abd8dba0bfd 100644 (file)
@@ -95,7 +95,7 @@ static int tdb_write(struct tdb_context *tdb, tdb_off_t off,
                        /* try once more */
                        TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_write: wrote only "
                                 "%d of %d bytes at %d, trying once more\n",
                        /* try once more */
                        TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_write: wrote only "
                                 "%d of %d bytes at %d, trying once more\n",
-                                written, len, off));
+                                (uint32_t)written, len, off));
                        errno = ENOSPC;
                        written = pwrite(tdb->fd, (void *)((char *)buf+written),
                                         len-written,
                        errno = ENOSPC;
                        written = pwrite(tdb->fd, (void *)((char *)buf+written),
                                         len-written,
@@ -275,11 +275,12 @@ static int tdb_expand_file(struct tdb_context *tdb, tdb_off_t size, tdb_off_t ad
                        return -1;
                } else if (written == -1) {
                        TDB_LOG((tdb, TDB_DEBUG_FATAL, "expand_file write of "
                        return -1;
                } else if (written == -1) {
                        TDB_LOG((tdb, TDB_DEBUG_FATAL, "expand_file write of "
-                               "%d bytes failed (%s)\n", n, strerror(errno)));
+                               "%d bytes failed (%s)\n", (uint32_t)n, strerror(errno)));
                        return -1;
                } else if (written != n) {
                        TDB_LOG((tdb, TDB_DEBUG_WARNING, "expand_file: wrote "
                        return -1;
                } else if (written != n) {
                        TDB_LOG((tdb, TDB_DEBUG_WARNING, "expand_file: wrote "
-                               "only %d of %d bytes - retrying\n", written,n));
+                               "only %d of %d bytes - retrying\n",
+                               (uint32_t)written, (uint32_t)n));
                }
                addition -= written;
                size += written;
                }
                addition -= written;
                size += written;