Compile C++ example with -Wall -Werror

This commit is contained in:
Nigel Tao committed 2018-06-30 10:56:04 +10:00
1 parent 6183aba9d7
commit 60a7b48745
11 files changed
+50 -50

No files matched your search

+5 -5
View File
@@ -1836,11 +1836,11 @@ static inline uint32_t wuffs_base__io_writer__copy_from_reader32(
uint32_t length) {
uint8_t* ioptr_w = *ptr_ioptr_w;
size_t n = length;
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
uint8_t* ioptr_r = *ptr_ioptr_r;
if (n > iobounds1_r - ioptr_r) {
if (n > ((size_t)(iobounds1_r - ioptr_r))) {
n = iobounds1_r - ioptr_r;
}
if (n > 0) {
@@ -1857,7 +1857,7 @@ static inline uint64_t wuffs_base__io_writer__copy_from_slice(
wuffs_base__slice_u8 src) {
uint8_t* ioptr_w = *ptr_ioptr_w;
size_t n = src.len;
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
if (n > 0) {
@@ -1877,7 +1877,7 @@ static inline uint32_t wuffs_base__io_writer__copy_from_slice32(
if (n > length) {
n = length;
}
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
if (n > 0) {
@@ -1891,7 +1891,7 @@ static inline wuffs_base__empty_struct wuffs_base__io_reader__set_limit(
wuffs_base__io_reader* o,
uint8_t* ioptr_r,
uint64_t limit) {
if (o && ((o->private_impl.bounds[1] - ioptr_r) > limit)) {
if (o && (((size_t)(o->private_impl.bounds[1] - ioptr_r)) > limit)) {
o->private_impl.bounds[1] = ioptr_r + limit;
}
return ((wuffs_base__empty_struct){});
+5 -5
View File
@@ -1836,11 +1836,11 @@ static inline uint32_t wuffs_base__io_writer__copy_from_reader32(
uint32_t length) {
uint8_t* ioptr_w = *ptr_ioptr_w;
size_t n = length;
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
uint8_t* ioptr_r = *ptr_ioptr_r;
if (n > iobounds1_r - ioptr_r) {
if (n > ((size_t)(iobounds1_r - ioptr_r))) {
n = iobounds1_r - ioptr_r;
}
if (n > 0) {
@@ -1857,7 +1857,7 @@ static inline uint64_t wuffs_base__io_writer__copy_from_slice(
wuffs_base__slice_u8 src) {
uint8_t* ioptr_w = *ptr_ioptr_w;
size_t n = src.len;
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
if (n > 0) {
@@ -1877,7 +1877,7 @@ static inline uint32_t wuffs_base__io_writer__copy_from_slice32(
if (n > length) {
n = length;
}
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
if (n > 0) {
@@ -1891,7 +1891,7 @@ static inline wuffs_base__empty_struct wuffs_base__io_reader__set_limit(
wuffs_base__io_reader* o,
uint8_t* ioptr_r,
uint64_t limit) {
if (o && ((o->private_impl.bounds[1] - ioptr_r) > limit)) {
if (o && (((size_t)(o->private_impl.bounds[1] - ioptr_r)) > limit)) {
o->private_impl.bounds[1] = ioptr_r + limit;
}
return ((wuffs_base__empty_struct){});
+5 -5
View File
@@ -1924,11 +1924,11 @@ static inline uint32_t wuffs_base__io_writer__copy_from_reader32(
uint32_t length) {
uint8_t* ioptr_w = *ptr_ioptr_w;
size_t n = length;
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
uint8_t* ioptr_r = *ptr_ioptr_r;
if (n > iobounds1_r - ioptr_r) {
if (n > ((size_t)(iobounds1_r - ioptr_r))) {
n = iobounds1_r - ioptr_r;
}
if (n > 0) {
@@ -1945,7 +1945,7 @@ static inline uint64_t wuffs_base__io_writer__copy_from_slice(
wuffs_base__slice_u8 src) {
uint8_t* ioptr_w = *ptr_ioptr_w;
size_t n = src.len;
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
if (n > 0) {
@@ -1965,7 +1965,7 @@ static inline uint32_t wuffs_base__io_writer__copy_from_slice32(
if (n > length) {
n = length;
}
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
if (n > 0) {
@@ -1979,7 +1979,7 @@ static inline wuffs_base__empty_struct wuffs_base__io_reader__set_limit(
wuffs_base__io_reader* o,
uint8_t* ioptr_r,
uint64_t limit) {
if (o && ((o->private_impl.bounds[1] - ioptr_r) > limit)) {
if (o && (((size_t)(o->private_impl.bounds[1] - ioptr_r)) > limit)) {
o->private_impl.bounds[1] = ioptr_r + limit;
}
return ((wuffs_base__empty_struct){});
+5 -5
View File
@@ -2041,11 +2041,11 @@ static inline uint32_t wuffs_base__io_writer__copy_from_reader32(
uint32_t length) {
uint8_t* ioptr_w = *ptr_ioptr_w;
size_t n = length;
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
uint8_t* ioptr_r = *ptr_ioptr_r;
if (n > iobounds1_r - ioptr_r) {
if (n > ((size_t)(iobounds1_r - ioptr_r))) {
n = iobounds1_r - ioptr_r;
}
if (n > 0) {
@@ -2062,7 +2062,7 @@ static inline uint64_t wuffs_base__io_writer__copy_from_slice(
wuffs_base__slice_u8 src) {
uint8_t* ioptr_w = *ptr_ioptr_w;
size_t n = src.len;
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
if (n > 0) {
@@ -2082,7 +2082,7 @@ static inline uint32_t wuffs_base__io_writer__copy_from_slice32(
if (n > length) {
n = length;
}
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
if (n > 0) {
@@ -2096,7 +2096,7 @@ static inline wuffs_base__empty_struct wuffs_base__io_reader__set_limit(
wuffs_base__io_reader* o,
uint8_t* ioptr_r,
uint64_t limit) {
if (o && ((o->private_impl.bounds[1] - ioptr_r) > limit)) {
if (o && (((size_t)(o->private_impl.bounds[1] - ioptr_r)) > limit)) {
o->private_impl.bounds[1] = ioptr_r + limit;
}
return ((wuffs_base__empty_struct){});
+5 -5
View File
@@ -2076,11 +2076,11 @@ static inline uint32_t wuffs_base__io_writer__copy_from_reader32(
uint32_t length) {
uint8_t* ioptr_w = *ptr_ioptr_w;
size_t n = length;
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
uint8_t* ioptr_r = *ptr_ioptr_r;
if (n > iobounds1_r - ioptr_r) {
if (n > ((size_t)(iobounds1_r - ioptr_r))) {
n = iobounds1_r - ioptr_r;
}
if (n > 0) {
@@ -2097,7 +2097,7 @@ static inline uint64_t wuffs_base__io_writer__copy_from_slice(
wuffs_base__slice_u8 src) {
uint8_t* ioptr_w = *ptr_ioptr_w;
size_t n = src.len;
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
if (n > 0) {
@@ -2117,7 +2117,7 @@ static inline uint32_t wuffs_base__io_writer__copy_from_slice32(
if (n > length) {
n = length;
}
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
if (n > 0) {
@@ -2131,7 +2131,7 @@ static inline wuffs_base__empty_struct wuffs_base__io_reader__set_limit(
wuffs_base__io_reader* o,
uint8_t* ioptr_r,
uint64_t limit) {
if (o && ((o->private_impl.bounds[1] - ioptr_r) > limit)) {
if (o && (((size_t)(o->private_impl.bounds[1] - ioptr_r)) > limit)) {
o->private_impl.bounds[1] = ioptr_r + limit;
}
return ((wuffs_base__empty_struct){});
+5 -5
View File
@@ -1860,11 +1860,11 @@ static inline uint32_t wuffs_base__io_writer__copy_from_reader32(
uint32_t length) {
uint8_t* ioptr_w = *ptr_ioptr_w;
size_t n = length;
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
uint8_t* ioptr_r = *ptr_ioptr_r;
if (n > iobounds1_r - ioptr_r) {
if (n > ((size_t)(iobounds1_r - ioptr_r))) {
n = iobounds1_r - ioptr_r;
}
if (n > 0) {
@@ -1881,7 +1881,7 @@ static inline uint64_t wuffs_base__io_writer__copy_from_slice(
wuffs_base__slice_u8 src) {
uint8_t* ioptr_w = *ptr_ioptr_w;
size_t n = src.len;
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
if (n > 0) {
@@ -1901,7 +1901,7 @@ static inline uint32_t wuffs_base__io_writer__copy_from_slice32(
if (n > length) {
n = length;
}
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
if (n > 0) {
@@ -1915,7 +1915,7 @@ static inline wuffs_base__empty_struct wuffs_base__io_reader__set_limit(
wuffs_base__io_reader* o,
uint8_t* ioptr_r,
uint64_t limit) {
if (o && ((o->private_impl.bounds[1] - ioptr_r) > limit)) {
if (o && (((size_t)(o->private_impl.bounds[1] - ioptr_r)) > limit)) {
o->private_impl.bounds[1] = ioptr_r + limit;
}
return ((wuffs_base__empty_struct){});
+5 -5
View File
@@ -2074,11 +2074,11 @@ static inline uint32_t wuffs_base__io_writer__copy_from_reader32(
uint32_t length) {
uint8_t* ioptr_w = *ptr_ioptr_w;
size_t n = length;
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
uint8_t* ioptr_r = *ptr_ioptr_r;
if (n > iobounds1_r - ioptr_r) {
if (n > ((size_t)(iobounds1_r - ioptr_r))) {
n = iobounds1_r - ioptr_r;
}
if (n > 0) {
@@ -2095,7 +2095,7 @@ static inline uint64_t wuffs_base__io_writer__copy_from_slice(
wuffs_base__slice_u8 src) {
uint8_t* ioptr_w = *ptr_ioptr_w;
size_t n = src.len;
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
if (n > 0) {
@@ -2115,7 +2115,7 @@ static inline uint32_t wuffs_base__io_writer__copy_from_slice32(
if (n > length) {
n = length;
}
if (n > iobounds1_w - ioptr_w) {
if (n > ((size_t)(iobounds1_w - ioptr_w))) {
n = iobounds1_w - ioptr_w;
}
if (n > 0) {
@@ -2129,7 +2129,7 @@ static inline wuffs_base__empty_struct wuffs_base__io_reader__set_limit(
wuffs_base__io_reader* o,
uint8_t* ioptr_r,
uint64_t limit) {
if (o && ((o->private_impl.bounds[1] - ioptr_r) > limit)) {
if (o && (((size_t)(o->private_impl.bounds[1] - ioptr_r)) > limit)) {
o->private_impl.bounds[1] = ioptr_r + limit;
}
return ((wuffs_base__empty_struct){});