fix new gcc compile warnings about unused variables
The latest yocto has brought in a new gcc which is causing building of
this repo due to fails like this:
```
slpd-lite/sock_channel.cpp:27:23: error: value computed is not used [-Werror=unused-value]
| 27 | buffer outBuffer(0);
| |
```
Fix this by just using the default vector constructor with no arguments
(resulting in a empty container to start with).
Change-Id: If06dfccd2aa234956e124c11bd268198be569e6d
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/slp_message_handler.cpp b/slp_message_handler.cpp
index 9441545..20f0358 100644
--- a/slp_message_handler.cpp
+++ b/slp_message_handler.cpp
@@ -363,7 +363,7 @@
std::tuple<int, buffer> processRequest(const Message& msg)
{
int rc = slp::SUCCESS;
- buffer resp(0);
+ buffer resp;
std::cout << "SLP Processing Request="
<< std::bitset<8>(msg.header.functionID) << "\n";
diff --git a/sock_channel.cpp b/sock_channel.cpp
index b6332cf..5480fbd 100644
--- a/sock_channel.cpp
+++ b/sock_channel.cpp
@@ -24,7 +24,7 @@
int rc = 0;
int readSize = 0;
ssize_t readDataLen = 0;
- buffer outBuffer(0);
+ buffer outBuffer;
if (ioctl(sockfd, FIONREAD, &readSize) < 0)
{