summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apphandler.cpp2
-rw-r--r--chassishandler.cpp2
-rw-r--r--globalhandler.cpp4
-rw-r--r--storageaddsel.cpp6
-rw-r--r--storagehandler.cpp2
5 files changed, 5 insertions, 11 deletions
diff --git a/apphandler.cpp b/apphandler.cpp
index 7b64c76..dd1d5aa 100644
--- a/apphandler.cpp
+++ b/apphandler.cpp
@@ -128,8 +128,6 @@ typedef struct
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_COOKIE = 4;
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 @@ int dbus_warm_reset()
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 @@ int find_sensor_type_string(uint8_t sensor_number, char **s) {
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:
fclose(fp);
}
- return size;
+ return static_cast<size_t>(size);
}
@@ -234,7 +234,7 @@ void send_esel(uint16_t recordid) {
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_ret_t ipmi_storage_reserve_sel(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
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.
OpenPOWER on IntegriCloud