I mobilized all my programming skills but I wasn't able to get rid of
warnings written below so I must reject this change.

In long term the only way seems to use C++ I/O operators in LogWriter
class which can safely deal with your example code.

I checked source code and it seems there aren't wrong usages of
LogWriter method, please correct me if I'm wrong.

Regards, Adam

On 04/29/2011 02:16 PM, Adam Tkac wrote:
> Sorry for late response, this mail got lost in my queue.
>
> You are right that current LogWriter implementation will have problems
> with your example. However your patch causes following compilation warnings:
>
> In file included from CConnection.cxx:28:0:
> ../../common/rfb/LogWriter.h: In member function 'void
> rfb::LogWriter::error(const char*, any, ...) [with any = int]':
> ../../common/rfb/LogWriter.h:92:5: warning: second parameter of
> 'va_start' not last named argument
>
> I'm trying to find a way how to get rid of this warning but I haven't
> been successful, yet.
>
> Regards, Adam
>
> On 02/11/2011 12:14 AM, Jochen Neubeck wrote:
>> Consider the following example:
>>
>> try {
>>  static const char silly_example[] = "just a %silly% example";
>>  char expanded[100];
>>  if (!ExpandEnvironmentStrings(silly_example, expanded, sizeof expanded))
>>    throw rdr::Exception("failed to expand %s", silly_example);
>> } catch (rdr::exception &e) {
>>  vlog.error(e.str());
>> }
>>
>> The %s from %silly% directs vlog.error() to substitute a non-existing
>> char * argument, which might cause odd things including crash.
>>
>> Regards,
>> Jochen
>>
>
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network 
> management toolset available today.  Delivers lowest initial 
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> Tigervnc-devel mailing list
> Tigervnc-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tigervnc-devel


------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

Reply via email to