[Xorp-cvs] XORP cvs commit: xorp/libxorp

Bruce M. Simpson bms at icir.org
Tue Apr 22 09:54:53 PDT 2008


Pavlin Radoslavov wrote:
> The above commit fixes the compilation error, but doesn't fix the
> problem.
> In the original code, variable "junk_seed" has been intentionally
> left uninitialized so when used it will increase the
> unpredictability in the randomness.
> In fact, "junk_seed" has been used to feed the unpredicted value
> into variable "junk" as a compiler work-around.
> Is there any way to rewrite the code to keep the gcc-4.2 compiler
> happy and keep junk_seed unintialized?
> E.g., maybe by using a pointer to "junk_seed" or an array of 1-2
> elements of type "long" or something like this.

Without compiler pragmas, it is difficult to do so without changing 
compiler options on a per-file basis -- unless we turn off -Werror, and 
that ain't gonna happen.

Boost.Build will allow changing CFLAGS on a per-file basis, it has a 
different syntax for this. We could in theory do same with automake...

I could back it out, but that breaks g++ 4.2 compilation w/-Werror.

BMS



More information about the Xorp-cvs mailing list