[Xorp-cvs] XORP cvs commit: xorp/libxorp
Pavlin Radoslavov
pavlin at ICSI.Berkeley.EDU
Tue Apr 22 08:45:17 PDT 2008
Bruce Simpson <bms at icir.org> wrote:
> CVSROOT: /usr/local/www/data/cvs
> Module name: xorp
> Changes by: bms at chum.icir.org 2008-04-22 13:13:45 UTC
>
> XORP CVS repository
>
>
> Modified files:
> libxorp random.c
>
> Log message:
> Fix an uninitialized variable warning in gcc 4.2.
>
> Obtained from: XORP/OLSR
> Sponsored by: CenGen, Inc.
>
> Revision Changes Path
> 1.15 +2 -2; commitid: e598480de48141a7; xorp/libxorp/random.c
Bruce,
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.
Thanks,
Pavlin
More information about the Xorp-cvs
mailing list