Ensure all tools are building with -Wall and -Werror

Corrected resulting compiler errors from correctly adding -Wall &
-Werror within configure.ac.

Change-Id: Ia7aaafa83103322ad4b50171d62144624dd71e42
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/apphandler.cpp b/apphandler.cpp
index 7b64c76..dd1d5aa 100644
--- a/apphandler.cpp
+++ b/apphandler.cpp
@@ -128,8 +128,6 @@
 int convert_version(const char *p, rev_t *rev)
 {
     char *s, *token;
-    char hexbyte[5];
-    int l;
     uint16_t commits;
 
     if (*p != 'v')
diff --git a/chassishandler.cpp b/chassishandler.cpp
index 9a5f169..c6753e8 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
@@ -27,7 +27,7 @@
 constexpr size_t SIZE_VERSION = 2;
 constexpr auto   MAC_ADDRESS_FORMAT = "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx";
 constexpr auto   IP_ADDRESS_FORMAT = "%d.%d.%d.%d";
-constexpr auto   PREFIX_FORMAT = "%d";
+constexpr auto   PREFIX_FORMAT = "%hhd";
 constexpr auto   ADDR_TYPE_FORMAT = "%hhx";
 //PetiBoot-Specific
 static constexpr uint8_t net_conf_initial_bytes[] = {0x80,0x21, 0x70 ,0x62 ,0x21,
diff --git a/globalhandler.cpp b/globalhandler.cpp
index 9008278..caa94bb 100644
--- a/globalhandler.cpp
+++ b/globalhandler.cpp
@@ -81,10 +81,8 @@
     sd_bus_error error = SD_BUS_ERROR_NULL;
     sd_bus_message *m = NULL;
     sd_bus *bus = NULL;
-    char* temp_buf = NULL;
-    uint8_t* get_value = NULL;
     char* connection = NULL;
-    int r, i;
+    int r;
 
     r = obj_mapper_get_connection(&connection, control_object_name);
     if (r < 0) {
diff --git a/storageaddsel.cpp b/storageaddsel.cpp
index 165e9d5..2deb3cb 100644
--- a/storageaddsel.cpp
+++ b/storageaddsel.cpp
@@ -79,7 +79,7 @@
 size_t getfilestream(const char *fn, uint8_t **buffer) {
 
 	FILE *fp;
-	size_t size = 0;
+	ssize_t size = 0;
 	int r;
 
 	if ((fp = fopen(fn, "rb")) != NULL) {
@@ -116,7 +116,7 @@
 		fclose(fp);
 	}
 
-	return size;
+	return static_cast<size_t>(size);
 }
 
 
@@ -234,7 +234,7 @@
 	const char *sev;
 	uint8_t *buffer = NULL;
 	const char *path = "/tmp/esel";
-	size_t sz;
+	ssize_t sz;
 	int r;
 
 	sz = getfilestream(path, &buffer);
diff --git a/storagehandler.cpp b/storagehandler.cpp
index 01dd41a..b567d84 100644
--- a/storagehandler.cpp
+++ b/storagehandler.cpp
@@ -104,8 +104,6 @@
                               ipmi_request_t request, ipmi_response_t response,
                               ipmi_data_len_t data_len, ipmi_context_t context)
 {
-    unsigned short res_id;
-
     ipmi_ret_t rc = IPMI_CC_OK;
 
     // IPMI spec, Reservation ID, the value simply increases against each execution of reserve_sel command.