Commit Graph

124 Commits

Author SHA1 Message Date
Daniel Marjamäki 4dbdb50317 split 2016-08-07 15:35:41 +02:00
Daniel Marjamäki fab2c96622 j2 2016-08-07 14:30:09 +02:00
PKEuS eafed235a6 Attempt to fix build on Unix systems, ran AStyle. 2016-07-26 16:50:32 +02:00
Daniel Marjamäki 79e663dd6f Settings: Remove '_' prefix for public member variables 2016-01-03 16:18:17 +01:00
Lauri Nurmi 996c9244d8 Update copyright year to 2007-2016. 2016-01-01 15:34:45 +02:00
Alexander Mai 5cf923d091 Don't run SymbolDatabase::validate on --debug. Replace some NULL by nullptr 2015-12-05 21:07:03 +01:00
Alexander Mai f762affea0 Small refactoring: replace NULL by nullptr, remove redundant static keyword, Tokenizer::setVarId() uses const variable 'notstart' 2015-11-30 22:13:49 +01:00
Daniel Marjamäki 0f9d90d2be Changed Copyrights. Removed my name. 2015-11-18 20:04:50 +01:00
PKEuS 92b867dd2c Fixed behaviour of --quiet/-q and its description 2015-07-25 17:55:12 +02:00
PKEuS 26fa994f14 Removed "#pragma warning" from threadexecutor.cpp 2015-01-21 18:46:33 +01:00
PKEuS fd2f93bb80 Two small refactorizations:
- Avoid leaving and entering again critical section without doing anything
- Use isPointer() in checkbufferoverrun.cpp instead of string comparison
2015-01-10 21:03:21 +01:00
Daniel Marjamäki ff11ba9847 Updated copyright year to 2015 2015-01-03 12:14:58 +01:00
Ni2c2k ab91e3eed2 getloadavg() is unsupported on Qnx 2014-12-16 20:09:40 +05:00
Lauri Nurmi c6d9e2b3d4 Fix plural of "child" -- it is not "childs" but "children". 2014-10-01 20:33:02 +03:00
amai2012 77095e2b05 Add some more functions to posix.cfg which allow to enable TestBufferOverrun::buffer_overrun_1_posix_functions
Fix some compiler warnings on MSVC
2014-07-05 22:47:10 +02:00
Jay Sigbrandt e7210521ac Many platforms don't support backtraces. Fix compile for Solaris platform.
This change was tested with Solaris 10 on X86 and SPARC.

More information on Unix Backtrace Support
 - http://www.gnu.org/software/libc/manual/html_node/Backtraces.html

It is not supported on the following platforms:
 - https://www.gnu.org/software/gnulib/manual/html_node/execinfo_002eh.html

        Mac OS X 10.3,
        FreeBSD 6.0,
        NetBSD 5.0,
        OpenBSD 3.8,
        Minix 3.1.8,
        AIX 5.1,
        HP-UX 11,
        IRIX 6.5,
        OSF/1 5.1,
        Solaris 10,
        Cygwin,
        mingw,
        MSVC 9,
        Interix 3.5,
        BeOS.
2014-06-26 11:41:16 +02:00
PKEuS 1fc1ff1993 Moved implementation of two functions to new file check.cpp -> Don't include <iostream> everywhere 2014-05-24 12:50:04 +02:00
Alexander 2328704ca2 Fix compilation under cygwin since getloadavg() is not available there 2014-04-05 20:47:02 +02:00
PKEuS 019d4491fb Fixed compilation on Windows.
[ci skip]
2014-03-25 19:20:59 +01:00
Troshin V.S 840fba7672 CLI: Add -l command line option 2014-03-25 18:35:59 +01:00
Daniel Marjamäki fd3a8a2a18 Update copyright 2014-02-15 07:45:39 +01:00
Daniel Marjamäki 43b40b7465 Refactoring: Reordered includes. Put local ones before system includes. 2013-09-04 06:18:22 +02:00
PKEuS 2ec5d8953e Small refactorization in threadexecutor.cpp: Use prefix increment; Reuse iterator. 2013-03-31 01:26:09 -07:00
Andrew C. Martin bd0d9b9639 fix misspellings & gcc v3.4.6 warnings
1.  fix typos / misspellings
 - Fix misspelling within comments, variable/function names, stdout messages
 - changes the name of an error code: ```stlBoundries``` changed to ```stlBoundaries```.  Alias old name (```stlBoundries```) to the new one.

2.  fix gcc v3.4.6 32bit & 64bit warnings

 - fixes gcc v3.4.6 warnings, except for those in tinyxml and "-Wmissing-declarations" makefile warnings
 - in Preprocessor::handleIncludes(), replace a ```vector <bool>``` with ```stack<bool>``` (see ```vector<bool>``` warning below).
   - this is the only ```vector<bool>``` in the codebase
 - ```vector <bool>``` is actually a case of template specialization, and is not recommended, according to the following links:

http://stackoverflow.com/q/6461487
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2160.html
http://stackoverflow.com/q/670308

 - in the codebase before and after this change, testrunner SEGVs in a number of places on gcc v3.4.6, including ```Check::~Check()```, among others
   - fc42fc95 fixes this particular runtime issue for DJGPP & __sun
2013-02-09 23:43:09 -07:00
Andrew C. Martin 4a73c93750 Fix compiler warnings and comment/string typos
- fix g++ warning:

> lib/checkother.cpp:3779: warning: comparison between signed and unsigned integer expressions

 - fix suncc warning (see [everything2](http://everything2.com/title/C%252B%252B%253A+static+extern+%2522C%2522)):

> "lib/checkmemoryleak.cpp", line 578: Warning (Anachronism): Formal argument __compar of type extern "C" int(*)(const void*,const void*) in call to bsearch(const void*, const void*, unsigned long, unsigned long, extern "C" int(*)(const void*,const void*)) is being passed int(*)(const void*,const void*).

- prefer empty() / isEmpty() over "size() > 0" (cases not caught by stlSize)

- fix word misspellings (mostly comments, a few output lines)

  - Parenthesis => Parentheses (both variations were used in the codebase)

  - fix typo and wording ("never alwayw") in gui/test/data/benchmark/simple.cpp's CheckOther::unsignedPositive():

```
-  "An unsigned variable will never alwayw be positive so it is either pointless or "
+  "An unsigned variable can't be negative so it is either pointless or "
```
2013-01-16 07:37:07 -07:00
Daniel Marjamäki dc0ecb1082 ThreadExecutor: include sys/select.h for fd_set 2013-01-13 13:21:46 +01:00
Reijo Tomperi 5d5f7085bf Updating year 2012 -> 2013 to .cpp and .h files and man page. 2013-01-01 18:29:08 +02:00
acm4me 7da155c8ba Support for Sun Studio C++ compiler 2012-12-27 11:51:12 +01:00
Gerhard Zlabinger d149b9b06c Travis: Fixed Cppcheck warnings 2012-12-13 21:03:41 +01:00
Gerhard Zlabinger 4bb62fc8b2 CLI: write status messages 2012-12-13 18:47:13 +01:00
Gerhard Zlabinger 6442938fe9 Fixed #648 (Threads in Windows) 2012-12-12 19:09:37 +01:00
Edoardo Prezioso 6cfb664def Fixed a related issue with the ThreadExecutor fix
Don't call reportErr when the message type is a REPORT_INFO, but call reportInfo instead.
2012-10-19 20:20:29 +02:00
Edoardo Prezioso d459b6acb1 Fixed #4298 (Strange 'missing include' output message when executing '-jn --check-config'). 2012-10-19 19:26:42 +02:00
PKEuS 0ea1124a19 Fixed warning of Intel Compiler:
- standard conformant main function in testrunner.cpp
Fixed warning of Intel and MSVC Compilers:
- commented out unused parameter
2012-07-11 01:26:32 -07:00
Edoardo Prezioso fae40c4782 Change every C version of 'size_t' to C++ 'std::size_t'. 2012-07-09 13:30:18 +02:00
Kimmo Varis 68c52ddd69 Refactoring information messages.
Currently the information severity messages are outputted as error
messages with Severity::Information. This causes constant confusion
as people think it as mildest error severity (and rightfully so).
When it was meant to be for printing messages about the checking
procedure itself (like missing header files etc).

So I'm adding a new function for the ErrorLogger for printing these
informative messages. This makes clear the distinction of errors
found from the code and messages related to the checking itself.
It also makes it easier for clients to handle these separately.
2012-06-19 00:16:20 +03:00
Daniel Marjamäki eea0974a5d fixed compiler errors 2012-04-08 15:22:50 +02:00
PKEuS a399a22b09 Fixed compilation error (#3709) 2012-04-07 13:55:03 +02:00
Edoardo Prezioso 28431da0ae Nitpicky style change: use 'for(;;)' construct instead of 'while(true)' in the code. 2012-03-24 21:50:09 +01:00
PKEuS 9f42ce91a1 Refactored STL container usage in CLI.
Pathmatcher masks are converted to lowercase only once when instance is created
2012-02-19 17:22:59 +01:00
Reijo Tomperi 1a6894fe25 Fix warnings with -Wconversion in gcc in threadexecutor 2012-01-03 22:21:17 +02:00
Reijo Tomperi 1b03667d5b Refactoring: Replace '1', '2', '3' magic characters with enum names: REPORT_OUT='1',REPORT_ERROR='2', CHILD_END='3' in ThreadExecutor. 2012-01-03 20:51:16 +02:00
Reijo Tomperi 8cae17fda8 Update year to 2012 2012-01-01 01:05:37 +02:00
PKEuS dca03c3ce2 Remove unnecessary includes
Also add a unit test related to #3427
Also improve the description text in checkclass and remove unused variable.
2011-12-23 23:31:48 +02:00
Reijo Tomperi 5fefaf4166 Improve error logging in ThreadExecutor 2011-11-09 22:15:53 +02:00
Daniel Marjamäki 6f8e42a5af changed the astyle formatting flags 2011-10-13 20:53:06 +02:00
Greg Hewgill 4cc13f497d Allow suppression of the 'cppcheckError' error reported by the threaded CLI executor.
This is related to commit 5bbf39d094.
2011-05-22 20:47:55 +12:00
Kimmo Varis c7d99fe9a7 Remove ErrorLogger::reportStatus() method.
The ErrorLogger::reportStatus() is not lib code interface. The CLI
code does the looping through file list and gives one file at a
time for the core code. Hence lib has no any idea about the
progress and it can't provide such information.

Also the recent commit (6d858b6) caused a GUI build failure by
adding CLI code dependency to GUI. Which is big no-no.

This is admittedly a hack. But it allow us to build all modules
again.
2011-04-27 23:27:02 +03:00
Greg Hewgill 6d858b63a1 Report percentage complete based on file size
This patch makes the (reasonable) assumption that the total size of all checked
files fits in a 'long' type.
2011-04-26 22:26:23 +12:00
Kimmo Varis f240574107 Modify the Cppcheck class to check one file at a time.
Unify usage and API of CppCheck class. Allow only one file checked
at a time, instead of list of files. Clients can then handle file
lists more naturally and as they see fit. Also clients have better
knowledge of how checking status should be handled.

The single-threaded CLI checking was only one using the file list.
Other clients were giving files (to list) one file at a time.
2011-04-24 19:17:52 +03:00
Daniel Marjamäki 58dbbb0cab Inconclusive checking: Report inconclusive errors with reportInconclusiveError. It takes the same parameters as reportError. 2011-04-14 18:02:01 +02:00
Greg Hewgill 5bbf39d094 Refactor ThreadExecutor::check() to handle child failures more gracefully 2011-03-05 16:43:22 +13:00
Greg Hewgill 957bb5c0f2 Normalise threading support checking into a single #define 2011-03-05 11:27:29 +13:00
Greg Hewgill 5d74325015 implement unmatchedSuppression information message 2011-02-16 23:02:37 +13:00
Reijo Tomperi 226b605774 Change year 2010 -> 2011 in license texts. 2011-01-09 21:33:36 +02:00
Daniel Marjamäki 76cf097104 testrunner: fix runtime problems with TestThreadExecutor 2010-12-31 12:04:37 +01:00
Daniel Marjamäki d8f241e033 gcc: fixed -Wconversion errors 2010-12-31 09:51:27 +01:00
Daniel Marjamäki dfc7a13286 usleep: use nanosleep instead of usleep as the usleep is obsolete. Ticket: #2283 2010-12-30 21:35:53 +01:00
Daniel Marjamäki e6bef96711 ThreadExecutor: Fixed error message 'member variable _pipe not initialized'. Ticket: #2283 2010-12-09 19:03:41 +01:00
Daniel Marjamäki ba7a3b376e Fixed #2167 (Drop linefeeds from error messages) 2010-11-11 19:54:43 +01:00
Kimmo Varis 2fa4378338 Astyle cleanup with new Astyle options. 2010-07-31 15:44:08 +03:00
Kimmo Varis d860c7b4a1 Astyle cleanup. 2010-07-30 22:16:12 +03:00
Kimmo Varis fa0f6edacf Rename ErrorMessage::toText() to ErrorMessage::toString(). 2010-07-14 18:31:05 +03:00
Reijo Tomperi b5da0b8ed2 Fixed #1650 (Cppcheck deadlock)
http://sourceforge.net/apps/trac/cppcheck/ticket/1650
2010-07-07 15:42:39 +03:00
Reijo Tomperi c27e631aa2 Add testthreadexecutor.cpp 2010-06-14 23:18:09 +03:00
Daniel Marjamäki c718a7c595 astyle: Update to astyle 1.24 2010-04-15 20:08:51 +02:00
Reijo Tomperi 35d2a27b9c Update copyright year in all source files 2010-04-13 22:23:17 +03:00
Reijo Tomperi 6dc3860ae9 Fix more -Wshadow compile warnings 2010-04-09 22:40:37 +03:00
Daniel Marjamäki 0cad22314e Reverted 'astyle fix'. Those changes are not in sync with my astyle configuration/setup. 2010-04-02 07:30:58 +02:00
Martin Ettl 193aa7d1d3 astyle fix 2010-04-02 02:21:53 +02:00
Daniel Marjamäki cca39ac1b7 lanurmi: Fixed threads handling when using Sun compiler 2010-01-14 22:01:33 +01:00
Daniel Marjamäki 90e44bb3bb restructuring the folder structure 2009-10-25 21:20:42 +01:00
Daniel Marjamäki d4f706e040 fixed qmake building with new folder structure 2009-10-25 19:29:10 +01:00
Daniel Marjamäki 09859c1019 refactoring the folder structure 2009-10-25 12:49:06 +01:00