ensure fd initialized
New upstream yocto enforces stricter compile rules. Without this commit,
we get this error:
| ../git/oem/ibm/libpldmresponder/utils.cpp:62:9: error: 'fd' may be used uninitialized in this function [-Werror=maybe-uninitialized]
| 62 | int fd;
| |
| cc1plus: all warnings being treated as errors
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: Ie089dfbede0361963a90828ce6826e324285b50d
diff --git a/oem/ibm/libpldmresponder/utils.cpp b/oem/ibm/libpldmresponder/utils.cpp
index b8bbdf0..370e8b5 100644
--- a/oem/ibm/libpldmresponder/utils.cpp
+++ b/oem/ibm/libpldmresponder/utils.cpp
@@ -59,7 +59,7 @@
FD_ZERO(&rfd);
FD_SET(sock, &rfd);
int nfd = sock + 1;
- int fd;
+ int fd = -1;
int retval = select(nfd, &rfd, NULL, NULL, &tv);
if (retval < 0)