[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Type narrowing warnings on Mac OS x64 as of r1349288

From: Stefan Fuhrmann <eqfox_at_web.de>
Date: Thu, 14 Jun 2012 12:45:13 +0200

On 06/12/2012 02:35 PM, Philip Martin wrote:
> Branko Čibej<brane_at_apache.org> writes:
>
>> Better than spamming #svn-dev, here's the current list of 64-32bit
>> narrowing warnings I get on my 64-bit mac wit Xcode 4.3.3's gcc. Taking
>> a quick look at these, every case appears to be a valid warning that
>> needs to be looked at and verified that the narrowing doesn't affect the
>> value.
>>
>> i don't know why these warnings don't show up on Linux and/or with newer
>> versions of GCC.
> They show up if one uses -Wconversion (on my 64 bit Linux platform) but
> they are swaped by other warnings so it is not enabled by default. For
> example this file:
>
>> subversion/libsvn_subr/cache-membuffer.c: In function 'svn_cache__membuffer_cache_create':
>> subversion/libsvn_subr/cache-membuffer.c:1078: warning: implicit conversion shortens 64-bit value into a 32-bit value
> has these warnings with -Wconversion -Wno-sign-conversion on 64 bit

Good to know these switches.
> Linux:
>
> ../src/subversion/libsvn_subr/cache-membuffer.c: In function ‘is_group_initialized’:
> ../src/subversion/libsvn_subr/cache-membuffer.c:705: warning: conversion to ‘unsigned char’ from ‘int’ may alter its value
> ../src/subversion/libsvn_subr/cache-membuffer.c: In function ‘initialize_group’:
> ../src/subversion/libsvn_subr/cache-membuffer.c:729: warning: conversion to ‘unsigned char’ from ‘int’ may alter its value
> ../src/subversion/libsvn_subr/cache-membuffer.c: In function ‘svn_cache__membuffer_cache_create’:
> ../src/subversion/libsvn_subr/cache-membuffer.c:1078: warning: conversion to ‘apr_uint32_t’ from ‘long unsigned int’ may alter its value
>
r1350021 should fix all that.

-- Stefan^2.
Received on 2012-06-14 12:45:54 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.