[Power] : Changes to resolve compiler warnings

Resolving compiler warnings

Change-Id: If4bde7e7b17d7ec3bd2fd57945662163e4171d82
This commit is contained in:
Divya Verma
2021-10-29 12:43:23 +05:30
committed by Gerrit - the friendly Code Review server
parent 62c0c21ae7
commit fe6e6b5169
3 changed files with 7 additions and 2 deletions

View File

@@ -101,14 +101,17 @@ void power_hint(power_hint_t hint, void *data)
handles[hint].ref_count++;
}
else
if (handles[hint].handle > 0)
if (handles[hint].handle > 0) {
if (--handles[hint].ref_count == 0) {
release_request(handles[hint].handle);
handles[hint].handle = 0;
}
}
else
ALOGE("Lock for hint: %X was not acquired, cannot be released", hint);
break;
default:
break;
}
}

View File

@@ -34,7 +34,9 @@
#include <libxml/tree.h>
#include <unistd.h>
#include "powerhintparser.h"
#ifndef LOG_TAG
#define LOG_TAG "QTI PowerHAL"
#endif
int parsePowerhintXML() {

View File

@@ -230,7 +230,7 @@ void interaction(int duration, int num_args, int opt_list[])
int interaction_with_handle(int lock_handle, int duration, int num_args, int opt_list[])
{
if (duration < 0 || num_args < 1 || opt_list[0] == NULL)
if (duration < 0 || num_args < 1 || opt_list == NULL)
return 0;
if (qcopt_handle) {