Bug 1061664: Ignore return value of read() in jsmath.cpp; r=till
authorBenjamin Bouvier <benj@benj.me>
Wed, 03 Sep 2014 15:38:24 +0200
changeset 203245 7a91c0ac0c752c153f5cd0377c6f1a493011361a
parent 203244 47bdae7e0574af7d3d07fd27d44fd53a2d7ccc90
child 203246 d227e849d2a59bff62f0f0571a3bfff6203dce74
push id48627
push userbenj@benj.me
push dateWed, 03 Sep 2014 13:38:59 +0000
treeherdermozilla-inbound@7a91c0ac0c75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstill
bugs1061664
milestone35.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1061664: Ignore return value of read() in jsmath.cpp; r=till
js/src/jsmath.cpp
--- a/js/src/jsmath.cpp
+++ b/js/src/jsmath.cpp
@@ -739,17 +739,17 @@ random_generateSeed()
 #elif defined(XP_UNIX)
     /*
      * In the unlikely event we can't read /dev/urandom, there's not much we can
      * do, so just mix in the fd error code and the current time.
      */
     int fd = open("/dev/urandom", O_RDONLY);
     MOZ_ASSERT(fd >= 0, "Can't open /dev/urandom");
     if (fd >= 0) {
-        read(fd, seed.u8, mozilla::ArrayLength(seed.u8));
+        (void)read(fd, seed.u8, mozilla::ArrayLength(seed.u8));
         close(fd);
     }
     seed.u32[0] ^= fd;
 #else
 # error "Platform needs to implement random_generateSeed()"
 #endif
 
     seed.u32[1] ^= PRMJ_Now();