Excuse me, I have to send mail use my other mail address.

During these days, gmail is broken in China, except Safari from Mac Book,
none of my email client can connect to gmail (even Safari from iPad, can
not connect gmail).

And in honest, this year what I have done is really not quite well, next
year I should be improved: should scanning Bugzilla and try to fix the
existing issues (just like another members' suggestions to me).


Thanks.

On 12/29/14 12:04, Chen Gang S wrote:
> When failure occurs, random_seed may not be 0, so need reset it to 0
> manually, or will let the next call init_random_seed() incorrect.  The
> related warning:
> 
>   g++ -c  -DTARGET_NAME=\"parisc-gchen-linux\" -g -O2 -DIN_GCC  
> -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti 
> -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual 
> -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long 
> -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. 
> -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include 
> -I../../gcc/gcc/../libcpp/include  -I../../gcc/gcc/../libdecnumber 
> -I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
> -I../../gcc/gcc/../libbacktrace   -o toplev.o -MT toplev.o -MMD -MP -MF 
> ./.deps/toplev.TPo ../../gcc/gcc/toplev.c
>   ../../gcc/gcc/toplev.c: In function 'void init_local_tick()':
>   ../../gcc/gcc/toplev.c:276:56: warning: ignoring return value of 'ssize_t 
> read(int, void*, size_t)', declared with attribute warn_unused_result 
> [-Wunused-result]
> 
> It passes testsuite under x86_64-apple-darwin14.0.0
> 
> /gcc
> 2014-12-27  Chen Gang  <gang.chen.5...@gmail.com>
> 
>       * toplev.c (init_local_tick): Process the failure when read
>       fails for random_seed.
> ---
>  gcc/toplev.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/gcc/toplev.c b/gcc/toplev.c
> index 7e06247..e5262be 100644
> --- a/gcc/toplev.c
> +++ b/gcc/toplev.c
> @@ -273,7 +273,9 @@ init_local_tick (void)
>        int fd = open ("/dev/urandom", O_RDONLY);
>        if (fd >= 0)
>          {
> -          read (fd, &random_seed, sizeof (random_seed));
> +          if (read (fd, &random_seed, sizeof (random_seed))
> +              != sizeof (random_seed))
> +            random_seed = 0;
>            close (fd);
>          }
>  
> 

-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

Reply via email to