Description: fix FTBFS with clang
===================================================================
--- a/applets/mb-applet-battery.c
+++ b/applets/mb-applet-battery.c
@@ -157,18 +157,42 @@ struct avg_consumption {
 
 static struct avg_consumption a;
 
+struct entry {
+	char *key;
+	char *value;
+	char *unit;
+};
+
+static int
+line_parse(char *line, struct entry *e)
+{
+	char *ptr;
+	
+	ptr = strchr(line, ':');
+	if (!ptr)
+		return -1;
+	e->key = line;
+	*ptr = 0;
+	while (*++ptr && *ptr == ' ');
+	e->value = ptr;
+	while (*++ptr && *ptr != '\n' && *ptr != ' ');
+	*ptr = 0;
+	if (*++ptr) {
+		e->unit = ptr;
+		while (*++ptr && *ptr != '\n');
+		*ptr = 0;
+	} else
+		e->unit = 0;
+
+	return 0;
+}
+
 static int
 read_apm(int *values)
 {
 	enum ac_state { AC_UNKNOWN = -1, AC_OFFLINE = 0, AC_ONLINE = 1 };
 	enum bat_state { BAT_UNKNOWN = -1, BAT_CHARGING = 1, BAT_DISCHARGING = 2 };
 
-	struct entry {
-		char *key;
-		char *value;
-		char *unit;
-	};
-
 	struct acpi_status {
 		enum ac_state	ac_state;
 		enum bat_state	bat_state;
@@ -177,30 +201,6 @@ read_apm(int *values)
 		unsigned long	present_rate;
 	};
 
-	int
-	line_parse(char *line, struct entry *e)
-	{
-		char *ptr;
-		
-		ptr = strchr(line, ':');
-		if (!ptr)
-			return -1;
-		e->key = line;
-		*ptr = 0;
-		while (*++ptr && *ptr == ' ');
-		e->value = ptr;
-		while (*++ptr && *ptr != '\n' && *ptr != ' ');
-		*ptr = 0;
-		if (*++ptr) {
-			e->unit = ptr;
-			while (*++ptr && *ptr != '\n');
-			*ptr = 0;
-		} else
-			e->unit = 0;
-	
-		return 0;
-	}
-
 	FILE *f;
 	char line[1024];
 	struct entry e;
