mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-21 14:46:23 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user