Skip to content

Commit

Permalink
Add cppcheck target; Fixup cppcheck errors [BUG-116];
Browse files Browse the repository at this point in the history
  • Loading branch information
brezerk committed Sep 28, 2017
1 parent c0fdb67 commit 961a07c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
15 changes: 15 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -365,3 +365,18 @@ add_subdirectory(l10n)
IF (${CMAKE_SYSTEM_NAME} MATCHES FreeBSD)
add_subdirectory(freebsd)
ENDIF (${CMAKE_SYSTEM_NAME} MATCHES FreeBSD)

add_custom_target(cppcheck COMMAND cppcheck
--quiet
--force
--inconclusive
--error-exitcode=254
-I ${CMAKE_SOURCE_DIR}
-I ${CMAKE_SOURCE_DIR}/src/q4wine-gui
-I ${CMAKE_SOURCE_DIR}/src/q4wine-cli
-I ${CMAKE_SOURCE_DIR}/src/q4wine-helper
-I ${CMAKE_SOURCE_DIR}/src/q4wine-lib
-i qrc_q4wine.cpp
-i ${CMAKE_SOURCE_DIR}/build/
${CMAKE_SOURCE_DIR}
)
3 changes: 1 addition & 2 deletions src/core/xmlparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@

#include "xmlparser.h"

XmlParser::XmlParser(void)
XmlParser::XmlParser(void): appdb_appinfo(WineAppDBInfo())
{
appdb_appinfo=WineAppDBInfo();
page_current=0;
page_count=0;
return;
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/ps.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static char* getenvinfo(KINFO *k)
{
int mib[3], argmax, nargs, c = 0;
size_t size;
char *procargs, *sp, *np, *cp;
char *procargs, *sp = NULL, *np, *cp;

/* Get the maximum process arguments size. */
mib[0] = CTL_KERN;
Expand Down

0 comments on commit 961a07c

Please sign in to comment.