summaryrefslogtreecommitdiffstats
path: root/BatteryMeter.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2010-02-25 01:43:18 +0000
committerHisham Muhammad <hisham@gobolinux.org>2010-02-25 01:43:18 +0000
commit02a30bfecdd841b4ca48acfc9b5f2df7930e7a69 (patch)
tree0a86343ad37f77c10ed6cea35b49e5ff2b926163 /BatteryMeter.c
parent5cc89986887de19c8898ce36e3776b3483a72f2d (diff)
warning fixes
Diffstat (limited to 'BatteryMeter.c')
-rw-r--r--BatteryMeter.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/BatteryMeter.c b/BatteryMeter.c
index c1ec9ec4..11399d46 100644
--- a/BatteryMeter.c
+++ b/BatteryMeter.c
@@ -28,7 +28,7 @@ int BatteryMeter_attributes[] = {
BATTERY
};
-static unsigned long int parseUevent(FILE * file, char *key) {
+static unsigned long int parseUevent(FILE * file, const char *key) {
char line[100];
unsigned long int dValue = 0;
@@ -117,7 +117,7 @@ static ACPresence chkIsOnline() {
if (access(PROCDIR "/acpi/ac_adapter", F_OK) == 0) {
const struct dirent *dirEntries;
- char *power_supplyPath = PROCDIR "/acpi/ac_adapter";
+ const char *power_supplyPath = PROCDIR "/acpi/ac_adapter";
DIR *power_supplyDir = opendir(power_supplyPath);
char *entryName;
@@ -170,7 +170,7 @@ static ACPresence chkIsOnline() {
} else {
- char *power_supplyPath = "/sys/class/power_supply";
+ const char *power_supplyPath = "/sys/class/power_supply";
if (access("/sys/class/power_supply", F_OK) == 0) {
const struct dirent *dirEntries;
@@ -240,7 +240,7 @@ static double getProcBatData() {
static double getSysBatData() {
const struct dirent *dirEntries;
- char *power_supplyPath = "/sys/class/power_supply/";
+ const char *power_supplyPath = "/sys/class/power_supply/";
DIR *power_supplyDir = opendir(power_supplyPath);
@@ -292,7 +292,7 @@ static void BatteryMeter_setValues(Meter * this, char *buffer, int len) {
this->values[0] = percent;
- char *onAcText, *onBatteryText, *unknownText;
+ const char *onAcText, *onBatteryText, *unknownText;
unknownText = "%.1f%%";
if (this->mode == TEXT_METERMODE) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy