[Pcsclite-git-commit] [PCSC] 01/01: Fix compilation error with GCC 4.9

Ludovic Rousseau rousseau at moszumanska.debian.org
Wed Jan 18 16:20:15 UTC 2017


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository PCSC.

commit 9726152f2c6767f0fa3103ad307dc28ef7923852
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Wed Jan 18 17:16:16 2017 +0100

    Fix compilation error with GCC 4.9
    
    GCC 4.9 does not like when "__thread" is before "static"
    
    error.c: In function 'pcsc_stringify_error':
    error.c:81:2: error: '__thread' before 'static'
      __thread static char strError[75];
      ^
    
    clang 8.0 accept both constructions.
---
 src/error.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/error.c b/src/error.c
index 5acac5d..ed4567c 100644
--- a/src/error.c
+++ b/src/error.c
@@ -78,7 +78,7 @@ PCSC_API const char* pcsc_stringify_error(const LONG pcscError)
 {
 	/* Use a Thread-local storage so that the returned buffer
 	 * is thread safe */
-	__thread static char strError[75];
+	static __thread char strError[75];
 	const char *msg = NULL;
 
 	switch (pcscError)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/PCSC.git



More information about the Pcsclite-cvs-commit mailing list