diff options
author | Mattias Andrée <maandree@kth.se> | 2016-12-01 03:23:03 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-12-01 03:23:03 +0100 |
commit | 9ecf9c624c5272cf8d576ec173283ebfe72fd373 (patch) | |
tree | 8e098894b688a45144a6e7de81b97959490f0785 /src/cg-sleepmode.c | |
parent | Add makefile (diff) | |
download | cg-tools-9ecf9c624c5272cf8d576ec173283ebfe72fd373.tar.gz cg-tools-9ecf9c624c5272cf8d576ec173283ebfe72fd373.tar.bz2 cg-tools-9ecf9c624c5272cf8d576ec173283ebfe72fd373.tar.xz |
Fix warnings
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/cg-sleepmode.c')
-rw-r--r-- | src/cg-sleepmode.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cg-sleepmode.c b/src/cg-sleepmode.c index bfb88a0..bfa719a 100644 --- a/src/cg-sleepmode.c +++ b/src/cg-sleepmode.c @@ -15,8 +15,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define _DEFAULT_SOURCE -#define _BSD_SOURCE #include "cg-base.h" #include <libclut.h> @@ -43,7 +41,7 @@ const int64_t default_priority = ((int64_t)3) << 59; /** * The default class for the program */ -char* const default_class = PKGNAME "::cg-sleepmode::standard"; +char default_class[] = PKGNAME "::cg-sleepmode::standard"; @@ -178,7 +176,7 @@ static int parse_double(double* restrict out, const char* restrict str) char* end; errno = 0; *out = strtod(str, &end); - if (errno || (out < 0) || isinf(*out) || isnan(*out) || *end) + if (errno || (*out < 0) || isinf(*out) || isnan(*out) || *end) return -1; if (!strchr("0123456789.", *str)) return -1; @@ -235,6 +233,7 @@ int handle_args(int argc, char* argv[], char* method, char* site, if (blue_target >= 1) blue_time = 0; return 0; + (void) site; } |