Include prototype in Battery implementation

linux/Battery.c:291:6: warning: no previous prototype for function 'Battery_getData' [-Wmissing-prototypes]
void Battery_getData(double* level, ACPresence* isOnAC) {
     ^
This commit is contained in:
Christian Göttsche 2020-09-23 13:43:03 +02:00 committed by cgzones
parent ce0fd5f6d8
commit 4296e74ada
2 changed files with 4 additions and 1 deletions

View File

@ -7,6 +7,8 @@ in the source distribution for its full text.
Linux battery readings written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com). Linux battery readings written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
*/ */
#include "Battery.h"
#ifndef _GNU_SOURCE #ifndef _GNU_SOURCE
#define _GNU_SOURCE #define _GNU_SOURCE
#endif #endif
@ -18,7 +20,6 @@ Linux battery readings written by Ian P. Hands (iphands@gmail.com, ihands@redhat
#include <fcntl.h> #include <fcntl.h>
#include <time.h> #include <time.h>
#include <math.h> #include <math.h>
#include "BatteryMeter.h"
#include "StringUtils.h" #include "StringUtils.h"
#define SYS_POWERSUPPLY_DIR "/sys/class/power_supply" #define SYS_POWERSUPPLY_DIR "/sys/class/power_supply"

View File

@ -9,6 +9,8 @@ in the source distribution for its full text.
Linux battery readings written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com). Linux battery readings written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
*/ */
#include "BatteryMeter.h"
void Battery_getData(double* level, ACPresence* isOnAC); void Battery_getData(double* level, ACPresence* isOnAC);
#endif #endif