CVS: [VZ] wxWindows/src/common wxchar.cpp,1.111,1.112

Francesco Montorsi f18m_cpp217828 at yahoo.it
Tue Jul 4 07:18:40 PDT 2006


Hi,

ABX ha scritto:
>> Log Message:
>> wxVsnprintf() implementation with positional parameters support (patch 1462778); disabled for now
> 
> Sorry for the late reaction to this commit but it was hidden to me until
> recent changes in setups.h. It introduced wxPrintfConvSpec with 'char
> szFlags[]' however there are assignments of wxChar to it in unicode builds
> which cause warnings of assignment larger data to smaller variable.
that's how older wxVsnprintf() implementation worked, too...
however you're right; there are such assignments.
However I tried recompiling wx both in wxMSW and wxGTK with that portion 
of code enabled and I didn't see any warning; can you point me to the 
log with such warnings ?

> Before I
> go through silencing this warning I would like to be assured 'char[]' is
> expected type of this structure. Thanks in advance!
they should all be safe as AFAIK they all happen at points like:

             case wxT('X'):	// this is an ANSI-compatible char
                 CHECK_PREC
                 szFlags[flagofs++] = ch;	// assignment wxChar -> char

However looking at the log I could catch some unsafe assignment...

Thanks,
Francesco





More information about the wx-dev mailing list