Skip to content

Commit

Permalink
Merge branch 'cppcheck' into 'master'
Browse files Browse the repository at this point in the history
Use GNOME-specific rules with cppcheck

See merge request GNOME/gjs!532
  • Loading branch information
ptomato committed Nov 22, 2020
2 parents 1d6c70a + 4c02d47 commit 95a48ca
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Expand Up @@ -136,7 +136,7 @@ cppcheck:
image: uilianries/docker-cppcheck
stage: source_check
script:
- cppcheck . -v -f -q --error-exitcode=1 --inline-suppr --enable=warning,performance,portability
- cppcheck . -v -f -q --error-exitcode=1 --inline-suppr --library=gtk --enable=warning,performance,portability
except:
refs:
- schedules
Expand Down
2 changes: 1 addition & 1 deletion gjs/debugger.cpp
Expand Up @@ -75,7 +75,7 @@ static bool do_readline(JSContext* cx, unsigned argc, JS::Value* vp) {
fflush(stdout);
if (!fgets(buf, sizeof buf, stdin))
buf[0] = '\0';
line.reset(g_strchomp(g_strdup(buf)));
line.reset(g_strdup(g_strchomp(buf)));

if (!isatty(STDIN_FILENO)) {
if (feof(stdin)) {
Expand Down
2 changes: 1 addition & 1 deletion tools/run_cppcheck.sh
Expand Up @@ -4,4 +4,4 @@
ninja -C _build
cppcheck --project=_build/compile_commands.json --inline-suppr \
--enable=warning,performance,portability,missingInclude \
--force --quiet $@
--library=gtk --force --quiet $@

0 comments on commit 95a48ca

Please sign in to comment.