mirror of
https://github.com/torarnv/sparsebundlefs.git
synced 2026-02-26 18:35:50 +01:00
Enable -pedantic and fix use of %p with non-void* pointers
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
TARGET = sparsebundlefs
|
||||
|
||||
PKG_CONFIG = pkg-config
|
||||
override CFLAGS += -std=c++11 -Wall -O2 -g
|
||||
override CFLAGS += -std=c++11 -Wall -pedantic -O2 -g
|
||||
|
||||
GCC_4_2_OR_HIGHER := $(shell expr `$(CXX) -dumpversion | sed 's/\.//g'` \>= 420)
|
||||
ifeq "$(GCC_4_2_OR_HIGHER)" "1"
|
||||
|
||||
@@ -196,7 +196,7 @@ static int sparsebundle_read_process_band(const char *band_path, size_t length,
|
||||
char** buffer = static_cast<char**>(read_data);
|
||||
|
||||
syslog(LOG_DEBUG, "reading %zu bytes at offset %ju into %p",
|
||||
length, uintmax_t(offset), *buffer);
|
||||
length, uintmax_t(offset), static_cast<void *>(*buffer));
|
||||
|
||||
int band_file = open(band_path, O_RDONLY);
|
||||
if (band_file != -1) {
|
||||
@@ -221,7 +221,8 @@ static int sparsebundle_read_pad_with_zeroes(size_t length, void *read_data)
|
||||
{
|
||||
char** buffer = static_cast<char**>(read_data);
|
||||
|
||||
syslog(LOG_DEBUG, "padding %zu bytes of zeroes into %p", length, *buffer);
|
||||
syslog(LOG_DEBUG, "padding %zu bytes of zeroes into %p",
|
||||
length, static_cast<void *>(*buffer));
|
||||
|
||||
memset(*buffer, 0, length);
|
||||
*buffer += length;
|
||||
|
||||
Reference in New Issue
Block a user