From: James Page james.page@ubuntu.com, Bernd Zeimetz Date: Fri, 15 Jan 2021 11:26:14 +0000 (+0000) Subject: Avoid overloading on 32 bit architectures X-Git-Tag: archive/raspbian/14.2.16-1+rpi1^2~16 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=400ad6eab011fa2c6d49616fc6ca0457fe6523f9;p=ceph.git Avoid overloading on 32 bit architectures Forwarded: no unsigned and size_t are equivalent on 32 bit architectures, so only define the size_t based overload of advance on 64 bit architectures. https://wiki.debian.org/ArchitectureSpecificsMemo Gbp-Pq: Name 32bit-avoid-overloading.patch --- diff --git a/src/include/buffer.h b/src/include/buffer.h index 774ca0522..ef94302de 100644 --- a/src/include/buffer.h +++ b/src/include/buffer.h @@ -737,7 +737,12 @@ inline namespace v14_2_0 { void advance(int o) = delete; void advance(unsigned o); + +// unsigned and size_t are equivalent on 32bit architectures. +// so casting is only needed when not on 32bit. +#if defined(UINTPTR_MAX) && UINTPTR_MAX > 0xffffffff void advance(size_t o) { advance(static_cast(o)); } +#endif void seek(unsigned o); char operator*() const; iterator_impl& operator++();