summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-05-06 13:21:51 +0200
committerAndreas Baumann <abaumann@yahoo.com>2012-05-06 13:21:51 +0200
commitb38a4c1ea8fdd1b114c278d62f93803757a23bba (patch)
treefe2d857ab59d8df6e72276b3b189eec7a97289ad
parent9339779524134a2f5fa1197659569672a2f06f56 (diff)
downloadpgfuse-b38a4c1ea8fdd1b114c278d62f93803757a23bba.tar.gz
pgfuse-b38a4c1ea8fdd1b114c278d62f93803757a23bba.tar.bz2
small fixes
-rw-r--r--pgsql.c6
-rw-r--r--tests/testtypes.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/pgsql.c b/pgsql.c
index 7ed2d12..d8b983e 100644
--- a/pgsql.c
+++ b/pgsql.c
@@ -570,7 +570,7 @@ static int psql_write_block( PGconn *conn, const size_t block_size, const int64_
/* could actually be an assertion, as this can never happen */
if( offset + len > block_size ) {
- syslog( LOG_ERR, "Got a too big block write for file '%s', block '%20"PRIi64"': %20jd + %20zu > %d!",
+ syslog( LOG_ERR, "Got a too big block write for file '%s', block '%20"PRIi64"': %20jd + %20zu > %zu!",
path, block_no, offset, len, block_size );
return -EIO;
}
@@ -603,7 +603,7 @@ update_again:
/* we should never get here */
} else {
- syslog( LOG_ERR, "Unhandled write case for file '%s' in block '%"PRIi64"': offset: %jd, len: %zu, blocksize: %u",
+ syslog( LOG_ERR, "Unhandled write case for file '%s' in block '%"PRIi64"': offset: %jd, len: %zu, blocksize: %zu",
path, block_no, offset, len, block_size );
return -EIO;
}
@@ -698,7 +698,7 @@ int psql_write_buf( PGconn *conn, const size_t block_size, const int64_t id, con
return res;
}
if( res != block_size ) {
- syslog( LOG_ERR, "Partial write in file '%s' in block '%"PRIi64"' (%u instead of %u octets)",
+ syslog( LOG_ERR, "Partial write in file '%s' in block '%"PRIi64"' (%u instead of %zu octets)",
path, block_no, res, block_size );
return -EIO;
}
diff --git a/tests/testtypes.c b/tests/testtypes.c
index d8b3147..0f0cd27 100644
--- a/tests/testtypes.c
+++ b/tests/testtypes.c
@@ -18,7 +18,7 @@ int main(void)
off_t offset=TYPE_MAX(off_t); /* Depends on _FILE_OFFSET_BITS */
size_t size=TYPE_MAX(size_t); /* Depends on int size */
- printf("native int bits%20u %16x\n", sizeof(int)*CHAR_BIT, UINT_MAX);
+ printf("native int bits%20"PRIu64" %16"PRIx32"\n", sizeof(int)*CHAR_BIT, UINT_MAX);
printf("uint32_t max %20"PRIu32" %16"PRIx32"\n"
"uint64_t max %20"PRIu64" %16"PRIx64"\n"
"off_t max %20jd %16jx\n" /* try PRIdMAX if %jd unsupported */