Permalink
Browse files

MMap: Fix format string of debug messages

  • Loading branch information...
sanssecours committed Sep 11, 2018
1 parent 2dd9c9d commit df67c84ac3e522d571ab9c3b99a4efc8b90a79e4
@@ -1249,7 +1249,7 @@ int ELEKTRA_PLUGIN_FUNCTION (mmapstorage, set) (Plugin * handle, KeySet * ks, Ke
initHeader (&mmapHeader);
initMetaData (&mmapMetaData);
calculateMmapDataSize (&mmapHeader, &mmapMetaData, ks, dynArray);
ELEKTRA_LOG_DEBUG ("mmapsize: %zu", mmapHeader.allocSize);
ELEKTRA_LOG_DEBUG ("mmapsize: %llu", mmapHeader.allocSize);
if (truncateFile (fp, mmapHeader.allocSize, parentKey) != 1)
{
@@ -204,7 +204,7 @@ static void test_mmap_wrong_magic_number (const char * tmpFile)
char * mappedRegion = mmap (0, sbuf.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (mappedRegion == MAP_FAILED)
{
ELEKTRA_LOG_WARNING ("error mapping file %s\nmmapSize: %zu", tmpFile, sbuf.st_size);
ELEKTRA_LOG_WARNING ("error mapping file %s\nmmapSize: %lld", tmpFile, sbuf.st_size);
yield_error ("mmap() error");
return;
}
@@ -277,7 +277,7 @@ static void test_mmap_wrong_format_version (const char * tmpFile)
char * mappedRegion = mmap (0, sbuf.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (mappedRegion == MAP_FAILED)
{
ELEKTRA_LOG_WARNING ("error mapping file %s\nmmapSize: %zu", tmpFile, sbuf.st_size);
ELEKTRA_LOG_WARNING ("error mapping file %s\nmmapSize: %lld", tmpFile, sbuf.st_size);
yield_error ("mmap() error");
return;
}
@@ -350,7 +350,7 @@ static void test_mmap_wrong_magic_keyset (const char * tmpFile)
char * mappedRegion = mmap (0, sbuf.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (mappedRegion == MAP_FAILED)
{
ELEKTRA_LOG_WARNING ("error mapping file %s\nmmapSize: %zu", tmpFile, sbuf.st_size);
ELEKTRA_LOG_WARNING ("error mapping file %s\nmmapSize: %lld", tmpFile, sbuf.st_size);
yield_error ("mmap() error");
return;
}
@@ -87,7 +87,7 @@ static void test_mmap_crc_wrong_checksum (const char * tmpFile)
char * mappedRegion = mmap (0, sbuf.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (mappedRegion == MAP_FAILED)
{
ELEKTRA_LOG_WARNING ("error mapping file %s\nmmapSize: %zu", tmpFile, sbuf.st_size);
ELEKTRA_LOG_WARNING ("error mapping file %s\nmmapSize: %lld", tmpFile, sbuf.st_size);
yield_error ("mmap() error");
return;
}

0 comments on commit df67c84

Please sign in to comment.