diff --git a/.gitignore b/.gitignore index c894530..1d36d7a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,8 @@ cmake_install.cmake CTestTestfile.cmake Makefile Testing/ +CPackConfig.cmake +CPackSourceConfig.cmake # qt generated code *.qrc.depends diff --git a/CMakeLists.txt b/CMakeLists.txt index f983ebd..722b764 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -148,7 +148,7 @@ include(${QT_USE_FILE}) #------------------------------------------------------------------------------- add_definitions(${QT_DEFINITIONS}) -add_definitions(-Wextra) +add_definitions(-Wall -Wextra) if(NOT DISABLE_WERROR) add_definitions(-Werror) diff --git a/main.cpp b/main.cpp index f450678..dd9a27f 100644 --- a/main.cpp +++ b/main.cpp @@ -18,11 +18,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -extern "C" { #include /* First, so we avoid a _POSIX_C_SOURCE warning. */ #include #include -} #include @@ -35,7 +33,7 @@ extern "C" { void usage() { - fprintf(stderr, + fprintf(stdout, "Usage:\n" " %s — %s\n" "\n" @@ -73,7 +71,7 @@ int main(int argc, char *argv[]) switch (c) { case 'V': // Print version info - fprintf(stderr, "%s %s\n", PV_TITLE, PV_VERSION_STRING); + fprintf(stdout, "%s %s\n", PV_TITLE, PV_VERSION_STRING); return 0; case 'h': diff --git a/pv/dialogs/about.cpp b/pv/dialogs/about.cpp index 9195b83..53072e7 100644 --- a/pv/dialogs/about.cpp +++ b/pv/dialogs/about.cpp @@ -18,21 +18,18 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -extern "C" { #include -} #include #include "about.h" #include -extern "C" { /* __STDC_FORMAT_MACROS is required for PRIu64 and friends (in C++). */ #define __STDC_FORMAT_MACROS #include #include -} + namespace pv { namespace dialogs { diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index 35b0da5..6b0fa67 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -18,9 +18,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -extern "C" { #include -} #include #include @@ -37,7 +35,6 @@ extern "C" { #include "dialogs/about.h" #include "view/view.h" -extern "C" { /* __STDC_FORMAT_MACROS is required for PRIu64 and friends (in C++). */ #define __STDC_FORMAT_MACROS #include @@ -45,7 +42,7 @@ extern "C" { #include #include #include -} + namespace pv {