From 1ef1143609e3a3590a1df19e756839bf3303e5d0 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Mon, 5 Jan 2015 01:20:33 +0100 Subject: [PATCH] Make local functions static --- gui/main.cpp | 12 ++++++------ lib/checkio.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gui/main.cpp b/gui/main.cpp index 3674910fd..8e9d79bf7 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -35,9 +35,9 @@ #include "translationhandler.h" -void ShowUsage(); -void ShowVersion(); -bool CheckArgs(const QStringList &args); +static void ShowUsage(); +static void ShowVersion(); +static bool CheckArgs(const QStringList &args); int main(int argc, char *argv[]) { @@ -82,7 +82,7 @@ int main(int argc, char *argv[]) // Check only arguments needing action before GUI is shown. // Rest of the arguments are handled in MainWindow::HandleCLIParams() -bool CheckArgs(const QStringList &args) +static bool CheckArgs(const QStringList &args) { if (args.contains("-h") || args.contains("--help")) { ShowUsage(); @@ -95,7 +95,7 @@ bool CheckArgs(const QStringList &args) return true; } -void ShowUsage() +static void ShowUsage() { QString helpMessage = MainWindow::tr( "Cppcheck GUI.\n\n" @@ -120,7 +120,7 @@ void ShowUsage() #endif } -void ShowVersion() +static void ShowVersion() { #if defined(_WIN32) AboutDialog *dlg = new AboutDialog(CppCheck::version(), CppCheck::extraVersion(), 0); diff --git a/lib/checkio.cpp b/lib/checkio.cpp index 617f212ad..d1e42efa6 100644 --- a/lib/checkio.cpp +++ b/lib/checkio.cpp @@ -490,7 +490,7 @@ static bool findFormat(unsigned int arg, const Token *firstArg, } // Utility function returning whether iToTest equals iTypename or iOptionalPrefix+iTypename -inline bool typesMatch(const std::string& iToTest, const std::string& iTypename, const std::string& iOptionalPrefix = "std::") +static inline bool typesMatch(const std::string& iToTest, const std::string& iTypename, const std::string& iOptionalPrefix = "std::") { return (iToTest == iTypename) || (iToTest == iOptionalPrefix + iTypename); }