From 4e282eb845c68d70093dda2c078604d52e8fee87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Fri, 25 Sep 2020 14:03:55 +0200 Subject: [PATCH] Add -Wmissing-prototypes compiler warning --- configure.ac | 1 + darwin/Battery.c | 3 +-- darwin/Battery.h | 2 ++ dragonflybsd/Battery.c | 3 ++- dragonflybsd/Battery.h | 2 ++ freebsd/Battery.c | 3 ++- freebsd/Battery.h | 2 ++ openbsd/Battery.c | 3 ++- openbsd/Battery.h | 2 ++ solaris/Battery.c | 4 ++-- solaris/Battery.h | 2 ++ unsupported/Battery.c | 4 ++-- unsupported/Battery.h | 2 ++ 13 files changed, 24 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index be1075f9..a220155f 100644 --- a/configure.ac +++ b/configure.ac @@ -273,6 +273,7 @@ AM_CFLAGS="\ -Wfloat-equal\ -Wmissing-format-attribute\ -Wmissing-noreturn\ + -Wmissing-prototypes\ -Wpointer-arith\ -Wshadow\ -Wstrict-prototypes\ diff --git a/darwin/Battery.c b/darwin/Battery.c index 51d49c6d..772f3886 100644 --- a/darwin/Battery.c +++ b/darwin/Battery.c @@ -1,5 +1,4 @@ - -#include "BatteryMeter.h" +#include "Battery.h" #include diff --git a/darwin/Battery.h b/darwin/Battery.h index 21a1579a..74a27fc5 100644 --- a/darwin/Battery.h +++ b/darwin/Battery.h @@ -1,6 +1,8 @@ #ifndef HEADER_Battery #define HEADER_Battery +#include "BatteryMeter.h" + void Battery_getData(double* level, ACPresence* isOnAC); #endif diff --git a/dragonflybsd/Battery.c b/dragonflybsd/Battery.c index 58960429..bb1a575a 100644 --- a/dragonflybsd/Battery.c +++ b/dragonflybsd/Battery.c @@ -6,7 +6,8 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ -#include "BatteryMeter.h" +#include "Battery.h" + #include #include diff --git a/dragonflybsd/Battery.h b/dragonflybsd/Battery.h index f764a2dc..2e42351b 100644 --- a/dragonflybsd/Battery.h +++ b/dragonflybsd/Battery.h @@ -8,6 +8,8 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ +#include "BatteryMeter.h" + void Battery_getData(double* level, ACPresence* isOnAC); #endif diff --git a/freebsd/Battery.c b/freebsd/Battery.c index 009f7abe..2dd4609f 100644 --- a/freebsd/Battery.c +++ b/freebsd/Battery.c @@ -5,7 +5,8 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ -#include "BatteryMeter.h" +#include "Battery.h" + #include #include diff --git a/freebsd/Battery.h b/freebsd/Battery.h index 6987d78b..d9294556 100644 --- a/freebsd/Battery.h +++ b/freebsd/Battery.h @@ -7,6 +7,8 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ +#include "BatteryMeter.h" + void Battery_getData(double* level, ACPresence* isOnAC); #endif diff --git a/openbsd/Battery.c b/openbsd/Battery.c index 66e4b631..61233030 100644 --- a/openbsd/Battery.c +++ b/openbsd/Battery.c @@ -6,7 +6,8 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ -#include "BatteryMeter.h" +#include "Battery.h" + #include #include #include diff --git a/openbsd/Battery.h b/openbsd/Battery.h index e858b15d..bf80f3f6 100644 --- a/openbsd/Battery.h +++ b/openbsd/Battery.h @@ -8,6 +8,8 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ +#include "BatteryMeter.h" + void Battery_getData(double* level, ACPresence* isOnAC); #endif diff --git a/solaris/Battery.c b/solaris/Battery.c index 121d2e49..c824df24 100644 --- a/solaris/Battery.c +++ b/solaris/Battery.c @@ -1,6 +1,6 @@ -#include +#include "Battery.h" -#include "BatteryMeter.h" +#include void Battery_getData(double* level, ACPresence* isOnAC) { *level = NAN; diff --git a/solaris/Battery.h b/solaris/Battery.h index 21a1579a..74a27fc5 100644 --- a/solaris/Battery.h +++ b/solaris/Battery.h @@ -1,6 +1,8 @@ #ifndef HEADER_Battery #define HEADER_Battery +#include "BatteryMeter.h" + void Battery_getData(double* level, ACPresence* isOnAC); #endif diff --git a/unsupported/Battery.c b/unsupported/Battery.c index 121d2e49..c824df24 100644 --- a/unsupported/Battery.c +++ b/unsupported/Battery.c @@ -1,6 +1,6 @@ -#include +#include "Battery.h" -#include "BatteryMeter.h" +#include void Battery_getData(double* level, ACPresence* isOnAC) { *level = NAN; diff --git a/unsupported/Battery.h b/unsupported/Battery.h index 21a1579a..74a27fc5 100644 --- a/unsupported/Battery.h +++ b/unsupported/Battery.h @@ -1,6 +1,8 @@ #ifndef HEADER_Battery #define HEADER_Battery +#include "BatteryMeter.h" + void Battery_getData(double* level, ACPresence* isOnAC); #endif