Skip to content

Commit

Permalink
1.72: Updated Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
danmar committed Jan 9, 2016
1 parent a2b0d3c commit 36ec2ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -80,7 +80,7 @@ ifeq ($(CXX), clang++)
CPPCHK_GLIBCXX_DEBUG=
endif
ifndef CXXFLAGS
CXXFLAGS=-include lib/cxx11emu.h -pedantic -Wall -Wextra -Wabi -Wcast-qual -Wfloat-equal -Winline -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wshadow -Wsign-promo -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare -Wno-multichar $(CPPCHK_GLIBCXX_DEBUG) -g
CXXFLAGS=-std=c++0x -O2 -include lib/cxx11emu.h -DNDEBUG -Wall -Wno-sign-compare
endif

ifeq ($(CXX), g++)
Expand Down

5 comments on commit 36ec2ec

@webary
Copy link

@webary webary commented on 36ec2ec Mar 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tried to use this tools.
It is strong in most time, but when I run it with cppcheck * 2>err.txt in a directory in which include a .md file, it would check the .md file too.

So why do you think this as a normal case?

@matthiaskrgr
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cppcheck will try to parse all files you pass to it as argument.
The wildcard will expand to everything in the current folder, so also non-c{pp} files, thus the .md file is checked as well.

If you want to check the current directory recursively but only files that cppcheck thinks it can understand, try "cpcheck ."

@webary
Copy link

@webary webary commented on 36ec2ec Mar 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand.
when I run cppcheck, it shows below:

Cppcheck - A tool for static C/C++ code analysis

Syntax:
cppcheck [OPTIONS] [files or paths]

If a directory is given instead of a filename, *.cpp, *.cxx, *.cc, *.c++, *.c,
*.tpp, and *.txx files are checked recursively from the given directory.

It says that it will only check c or c++ file.

By the way, I have run cpcheck . like your tips, but I only get error of 'cpcheck' 不是内部或外部命令,也不是可运行的程序或批处理文件。

@danmar
Copy link
Owner Author

@danmar danmar commented on 36ec2ec Apr 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi there was a typo. Try:

cppcheck .

@webary
Copy link

@webary webary commented on 36ec2ec Apr 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get it, tks very much! @danmar

Please sign in to comment.