[med-svn] [cnrun] 07/10: use anon namespace instead of static, and __attribute__ ((format))

andrei zavada hmmr-guest at alioth.debian.org
Sun Sep 22 17:19:15 UTC 2013


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

hmmr-guest pushed a commit to branch master
in repository cnrun.

commit 0ecaddc54f9d7b25a7f91ed1d83c9b9f45cc7ac7
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Sun Sep 22 15:32:03 2013 +0300

    use anon namespace instead of static, and __attribute__ ((format))
---
 upstream/src/runner-main.cc |   23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/upstream/src/runner-main.cc b/upstream/src/runner-main.cc
index 494d5ea..fa16b61 100644
--- a/upstream/src/runner-main.cc
+++ b/upstream/src/runner-main.cc
@@ -34,19 +34,19 @@ const char *ScriptFileName = ""; // CNRUN_DEFAULT_SCRIPT;
 #define CNRUN_CLPARSE_ERROR		-2
 #define CNRUN_DUMP_PARAMS		-3
 
-
-static int parse_options( int argc, char **argv,
-			  list<SVariable>&);
+namespace {
+static int parse_options( int argc, char **argv, list<SVariable>&);
 static void usage( const char *argv0);
-
+}
 
 #define CNRUN_EARGS		-1
 #define CNRUN_ESETUP		-2
 #define CNRUN_ETRIALFAIL	-3
 
 
-static void
-LOG( int vrb, const char* fmt, ...)
+namespace {
+void LOG( int vrb, const char* fmt, ...) __attribute__ ((format (printf, 2, 3)));
+void LOG( int vrb, const char* fmt, ...)
 {
 	va_list ap;
 	va_start (ap, fmt);
@@ -54,7 +54,7 @@ LOG( int vrb, const char* fmt, ...)
 	Log->msgv( vrb, "CNrun", fmt, ap);
 	va_end (ap);
 }
-
+}
 
 int
 main( int argc, char *argv[])
@@ -111,9 +111,8 @@ main( int argc, char *argv[])
 
 
 
-
-
-static int
+namespace {
+int
 parse_options( int argc, char **argv, list<SVariable>& Variables)
 {
 	int	c;
@@ -211,7 +210,7 @@ parse_options( int argc, char **argv, list<SVariable>& Variables)
 
 
 
-static void
+void
 usage( const char *argv0)
 {
 	cout << "Usage: " << argv0 << "\n" <<
@@ -250,7 +249,7 @@ usage( const char *argv0)
 		" -h \t\t\tDisplay this help\n"
 		"\n";
 }
-
+} // namespace
 
 
 // EOF

-- 
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/cnrun.git



More information about the debian-med-commit mailing list