iscsi-scst: Suppress a compiler warning

Avoid that the following compiler warning is reported when compiling
iscsi-scst:

chap.c: In function 'chap_rand':
chap.c:348:5: warning: ignoring return value of 'read', declared with attribute warn_unused_result [-Wunused-result]
     (void)read(fd, &r, sizeof(r));
     ^

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5614 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2014-06-20 04:02:00 +00:00
parent 18e4fb0c83
commit c833137130
+2 -1
View File
@@ -344,7 +344,8 @@ static int chap_rand(void)
fd = open("/dev/urandom", O_RDONLY);
assert(fd != -1);
(void)read(fd, &r, sizeof(r));
if (read(fd, &r, sizeof(r)) < sizeof(r)) {
}
close(fd);
return r;
}