>From 02b4b377748e5740df8ecf63214505459b618f7f Mon Sep 17 00:00:00 2001 From: Mats Erik Andersson
Date: Fri, 5 Apr 2013 14:42:05 +0200 Subject: [PATCH] Warnings caused by gnulib. --- gl/m4/manywarnings.m4 | 1 - gl/timespec.h | 9 +++++++++ gl/xalloc.h | 3 +++ 3 files changed, 12 insertions(+), 1 deletions(-) diff --git a/gl/m4/manywarnings.m4 b/gl/m4/manywarnings.m4 index 45a30af..f71ddb9 100644 --- a/gl/m4/manywarnings.m4 +++ b/gl/m4/manywarnings.m4 @@ -117,7 +117,6 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC], -Wdouble-promotion \ -Wempty-body \ -Wendif-labels \ - -Wenum-compare \ -Wextra \ -Wformat-contains-nul \ -Wformat-extra-args \ diff --git a/gl/timespec.h b/gl/timespec.h index d665e6c..34c370a 100644 --- a/gl/timespec.h +++ b/gl/timespec.h @@ -55,6 +55,9 @@ _GL_INLINE_HEADER_BEGIN The (int) cast avoids a gcc -Wconversion warning. */ _GL_TIMESPEC_INLINE int +timespec_cmp (struct timespec a, struct timespec b); + +_GL_TIMESPEC_INLINE int timespec_cmp (struct timespec a, struct timespec b) { return (a.tv_sec < b.tv_sec ? -1 @@ -65,6 +68,9 @@ timespec_cmp (struct timespec a, struct timespec b) /* Return -1, 0, 1, depending on the sign of A. A.tv_nsec must be nonnegative. */ _GL_TIMESPEC_INLINE int +timespec_sign (struct timespec a); + +_GL_TIMESPEC_INLINE int timespec_sign (struct timespec a) { return a.tv_sec < 0 ? -1 : a.tv_sec || a.tv_nsec; @@ -79,6 +85,9 @@ struct timespec dtotimespec (double) /* Return an approximation to A, of type 'double'. */ _GL_TIMESPEC_INLINE double +timespectod (struct timespec a); + +_GL_TIMESPEC_INLINE double timespectod (struct timespec a) { return a.tv_sec + a.tv_nsec / 1e9; diff --git a/gl/xalloc.h b/gl/xalloc.h index da7c4b6..7c7029b 100644 --- a/gl/xalloc.h +++ b/gl/xalloc.h @@ -173,6 +173,9 @@ xnrealloc (void *p, size_t n, size_t s) */ XALLOC_INLINE void * +x2nrealloc (void *p, size_t *pn, size_t s); + +XALLOC_INLINE void * x2nrealloc (void *p, size_t *pn, size_t s) { size_t n = *pn; -- 1.7.2.5