mbox series

[BlueZ,v3,0/2] Fix 32 bit Compiler Errors

Message ID 20210127231005.1579325-1-brian.gix@intel.com (mailing list archive)
Headers show
Series Fix 32 bit Compiler Errors | expand

Message

Brian Gix Jan. 27, 2021, 11:10 p.m. UTC
In a couple places the sizeof() macro has been assumed to return a
(long unsigned) value, and so the string formater %lu has been used to
print out warnings derived from this assumption. While correct on 64 bit
systems, this is an incorrect assumption on 32 bit systems.

These two changes explicitly cast the sizeof return to long in the
affected cases.

v2: Fix bluez.test.bot warnings

v3: Just use %zu format descriptor, which should be architecture agnostic.

Brian Gix (2):
  advertising: Fix formater for size_t data type
  tools/mgmt-tester: Fix formatter for size_t value

 src/advertising.c   | 2 +-
 tools/mgmt-tester.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Brian Gix Jan. 28, 2021, 10:20 p.m. UTC | #1
Applied

On Wed, 2021-01-27 at 15:10 -0800, Brian Gix wrote:
> In a couple places the sizeof() macro has been assumed to return a
> (long unsigned) value, and so the string formater %lu has been used to
> print out warnings derived from this assumption. While correct on 64 bit
> systems, this is an incorrect assumption on 32 bit systems.
> 
> These two changes explicitly cast the sizeof return to long in the
> affected cases.
> 
> v2: Fix bluez.test.bot warnings
> 
> v3: Just use %zu format descriptor, which should be architecture agnostic.
> 
> Brian Gix (2):
>   advertising: Fix formater for size_t data type
>   tools/mgmt-tester: Fix formatter for size_t value
> 
>  src/advertising.c   | 2 +-
>  tools/mgmt-tester.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>