POV-Ray : Newsgroups : povray.programming : cleaning source code from warnings troubles : Re: cleaning source code from warnings troubles Server Time
28 Jul 2024 14:30:03 EDT (-0400)
  Re: cleaning source code from warnings troubles  
From: Thorsten Froehlich
Date: 30 Sep 2002 05:44:39
Message: <3d981d07@news.povray.org>
In article <5jsfpuofbifqlq9avonj4mejd3f7siihe0@4ax.com> , ABX 
<abx### [at] abxartpl>  wrote:

> It helped to add definition:
>
> #define FOURCHARS_TO_INT(c1,c2,c3,c4) \
>                     (((unsigned long) c1 << 24) | \
>                      ((unsigned long) c2 << 16) | \
>                      ((unsigned long) c3 << 8 ) | \
>                      ((unsigned long) c4      ))

No, this is incorrect!  All it does is trick the compiler in shutting up
with its nonsense messages while changing absolutely nothing for the broken
compiler, but potentially *breaking* the code on compilers which handle
multibyte character constants correctly!!!

The correct solution is to simply turn off the particular warning.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.