From 3bba51658b025ee6075eb9ebfe0ee32ee8b2c750 Mon Sep 17 00:00:00 2001 From: bustico Date: Mon, 25 Nov 2013 10:43:04 +0000 Subject: ° protect gcc pragma not available on old version of gcc ° tcl loop compiled for tcl8.4 --- tools/ivythroughput.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tools/ivythroughput.cpp') diff --git a/tools/ivythroughput.cpp b/tools/ivythroughput.cpp index e1734d5..68543e9 100644 --- a/tools/ivythroughput.cpp +++ b/tools/ivythroughput.cpp @@ -281,7 +281,7 @@ void emetteur (const char* bus, KindOfTest kod, int testDuration, # | | | __/ | (__ | __/ | | \ |_ | __/ | |_| | | | # |_| \___| \___| \___| |_| \__| \___| \__,_| |_| */ -#if defined(__GNUC__) +#if defined(__GNUC__) && __GNUC_PREREQ(4,7) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-security" #endif @@ -320,7 +320,7 @@ void recepteur_tp (const char* bus, KindOfTest kod, unsigned int inst, IvyStart (bus); IvyMainLoop (); } -#if defined(__GNUC__) +#if defined(__GNUC__) && __GNUC_PREREQ(4,7) #pragma GCC diagnostic pop #endif @@ -346,12 +346,12 @@ void recepteur_ml (const char* bus, KindOfTest kod, unsigned int inst, debugInt++; string reg = *iter; if (regexpAreUniq) { (reg += " ") += stream.str();} -#if defined(__GNUC__) +#if defined(__GNUC__) && __GNUC_PREREQ(4,7) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-security" #endif bindIdList.push_back (IvyBindMsg (recepteurCB, (void *) long(inst), reg.c_str())); -#if defined(__GNUC__) +#if defined(__GNUC__) && __GNUC_PREREQ(4,7) #pragma GCC diagnostic pop #endif @@ -555,12 +555,12 @@ void sendAllMessageCB (TimerId id, void *user_data, unsigned long delta) IvySendMsg ("startOfSequence"); ListOfString::iterator iter; for (iter=messages->begin(); iter != messages->end(); iter++) { -#if defined(__GNUC__) +#if defined(__GNUC__) && __GNUC_PREREQ(4,7) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-security" #endif envoyes += IvySendMsg ((*iter).c_str()); -#if defined(__GNUC__) +#if defined(__GNUC__) && __GNUC_PREREQ(4,7) #pragma GCC diagnostic pop #endif } @@ -641,13 +641,13 @@ void desabonneEtReabonneCB (TimerId id, void *user_data, unsigned long delta) ListOfString::const_iterator iter2; for (iter2=mds->regexps->begin(); iter2 != mds->regexps->end(); iter2++) { string reg = *iter2; -#if defined(__GNUC__) +#if defined(__GNUC__) && __GNUC_PREREQ(4,7) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-security" #endif mds->bindIdList->push_back (IvyBindMsg (recepteurCB, (void *) long(mds->inst), reg.c_str())); -#if defined(__GNUC__) +#if defined(__GNUC__) && __GNUC_PREREQ(4,7) #pragma GCC diagnostic pop #endif } -- cgit v1.1