On 12/05/2013 05:25 PM, Paul Eggert wrote:
> -static int
> +static int __always_inline
>  test_open (int (*func) (char const *, int, ...), bool print)

This fails `make check` in coreutils...

$ make V=1 TESTS= check
...
test-open.h:34:1: error: '__inline' is not at beginning of declaration 
[-Werror=old-style-declaration]

I verified the attached passes with the following and pushed.

  -g -O2
  -g -O2 -Werror=old-style-declaration
  -g -O1 -Wall  -D_FORTIFY_SOURCE=2
  -std=c89 -pedantic -Werror -g -O1 -Wall  -D_FORTIFY_SOURCE=2

cheers,
Pádraig.
>From 0658e5039f75053480a7599edca236fecffe100d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <p...@draigbrady.com>
Date: Mon, 9 Dec 2013 14:23:07 +0000
Subject: [PATCH] open-tests: fix build failure with
 -Werror=old-style-declaration

* tests/test-open.h: Reorder the inline to avoid the issue.
---
 ChangeLog         |    5 +++++
 tests/test-open.h |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 563e867..82a632a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2013-12-07  Pádraig Brady <p...@draigbrady.com>
 
+	open-tests: fix build failure with -Werror=old-style-declaration
+	* tests/test-open.h: Reorder the inline to avoid the issue.
+
+2013-12-07  Pádraig Brady <p...@draigbrady.com>
+
 	md5, sha1, sha256, sha512: fix link error with partial libcrypto
 	* m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Only clear LIB_CRYPTO at
 	init time, so that if early checks find crypto routines,
diff --git a/tests/test-open.h b/tests/test-open.h
index ff44b3e..2e634de 100644
--- a/tests/test-open.h
+++ b/tests/test-open.h
@@ -31,7 +31,7 @@
    appropriate headers are already included.  If PRINT, warn before
    skipping symlink tests with status 77.  */
 
-static int __always_inline
+static __always_inline int
 test_open (int (*func) (char const *, int, ...), bool print)
 {
   int fd;
-- 
1.7.7.6

Reply via email to