[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: Philip Martin <philip.martin_at_wandisco.com>
Date: Tue, 12 Jun 2012 13:35:29 +0100

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
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

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Received on 2012-06-12 14:36:09 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.