[Power] : Changes to resolve compiler warnings
Resolving compiler warnings Change-Id: If4bde7e7b17d7ec3bd2fd57945662163e4171d82
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
parent
62c0c21ae7
commit
fe6e6b5169
@@ -101,14 +101,17 @@ void power_hint(power_hint_t hint, void *data)
|
|||||||
handles[hint].ref_count++;
|
handles[hint].ref_count++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (handles[hint].handle > 0)
|
if (handles[hint].handle > 0) {
|
||||||
if (--handles[hint].ref_count == 0) {
|
if (--handles[hint].ref_count == 0) {
|
||||||
release_request(handles[hint].handle);
|
release_request(handles[hint].handle);
|
||||||
handles[hint].handle = 0;
|
handles[hint].handle = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
ALOGE("Lock for hint: %X was not acquired, cannot be released", hint);
|
ALOGE("Lock for hint: %X was not acquired, cannot be released", hint);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,9 @@
|
|||||||
#include <libxml/tree.h>
|
#include <libxml/tree.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "powerhintparser.h"
|
#include "powerhintparser.h"
|
||||||
|
#ifndef LOG_TAG
|
||||||
#define LOG_TAG "QTI PowerHAL"
|
#define LOG_TAG "QTI PowerHAL"
|
||||||
|
#endif
|
||||||
|
|
||||||
int parsePowerhintXML() {
|
int parsePowerhintXML() {
|
||||||
|
|
||||||
|
|||||||
2
utils.c
2
utils.c
@@ -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[])
|
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;
|
return 0;
|
||||||
|
|
||||||
if (qcopt_handle) {
|
if (qcopt_handle) {
|
||||||
|
|||||||
Reference in New Issue
Block a user