Commit Graph

20712 Commits

Author SHA1 Message Date
Daniel Marjamäki 8ad3e43f92 Add handling of a simple C++ contract 2019-07-12 16:05:35 +02:00
versat f47fc84825 opengl.cfg: Add glColor* functions 2019-07-12 14:34:15 +02:00
versat aaecd300de gtk.cfg: Add some gtk_widget_* functions
Found by daca@home (checkLibraryNoReturn)
2019-07-12 13:58:39 +02:00
versat f7e1a12c6f gtk.cfg: Fix g_object_new configuration, argument 2 can be NULL
It is valid to use NULL as second argument and thus do not specify any
properties for this object.
2019-07-12 12:37:02 +02:00
versat 2f1d828b0c gtk.cfg: Add more g_object_* functions
Found by daca@home
2019-07-12 12:10:45 +02:00
Daniel Marjamäki 68cc7516a1 Annotations: Add annotation __cppcheck_in_range__(low,high) 2019-07-12 11:09:54 +02:00
versat d223d73cdb opengl.cfg: Add glTexCoord* functions 2019-07-12 09:42:40 +02:00
orbitcowboy d81aa4caf8 windows.cfg: Added support for GetModuleFileName(). 2019-07-12 09:11:31 +02:00
versat a67abb5fa2 opengl.cfg: Add glNormal3* functions
Found by daca@home
2019-07-12 08:44:23 +02:00
Daniel Marjamäki 68a48daf1f Fix Cppcheck warning 2019-07-12 08:27:10 +02:00
IOBYTE 74e3114a64 Fix #9097 (Crash on thousands of "else ifs"s in gcc-avr package) (#1982)
* Fix #9097 (Crash on thousands of "else ifs"s in gcc-avr package)

* increase recursion count maximum to 512 because cppcheck was hitting the 256 limit

* 512 was too much for windows
2019-07-12 07:56:05 +02:00
Daniel Marjamäki 4a70208e0e GUI: Activate 'human knowledge' options 2019-07-11 21:05:52 +02:00
versat d4d9bb4830 qt.cfg: Add some global Qt functions
Found by daca@home
2019-07-11 16:20:22 +02:00
Daniel Marjamäki 783f7f1648 Rename safeValues to unknownValues 2019-07-11 16:05:48 +02:00
versat 30f49b2fbd qt.cfg: Add functions of classes QTest and QHash
References:
https://doc.qt.io/qt-5/qtest.html
https://doc.qt.io/qt-5/qhash.html

Most of the functions were found missing by daca@home.
2019-07-11 15:32:48 +02:00
versat d880830efc qt.cfg: Add functions of QPainter class
Reference:
https://doc.qt.io/qt-5/qpainter.html

Most of the function configurations were found missing by daca@home
2019-07-11 14:53:38 +02:00
Daniel Marjamäki 8eaa50c050 GUI: Tweak the 'Human knowledge' tab 2019-07-11 14:00:46 +02:00
Sebastian f239d4675b
gtk.cfg: Add g_object_set() (#1981)
Reference:
https://developer.gnome.org/gobject/stable/gobject-The-Base-Object-Type.html#g-object-set
2019-07-11 13:13:08 +02:00
Daniel Marjamäki e0f258db0c GUI: Start adding some 'human knowledge' configuration options 2019-07-11 10:27:18 +02:00
Sebastian a4bcb7e0fb
qt.cfg: Add functions of class QDate (#1979)
Reference:
https://doc.qt.io/qt-5/qdate.html

Found by daca@home
2019-07-11 09:47:33 +02:00
Sebastian e49b098a86
std.cfg: Add mem_fn() (#1976)
std.cfg: Add mem_fn()

Reference:
https://en.cppreference.com/w/cpp/utility/functional/mem_fn
2019-07-11 08:26:24 +02:00
IOBYTE 9700490e51 fix lib/checkclass.cpp:51:12: warning: enumeration value ‘eLambda’ not handled in switch [-Wswitch] (#1978) 2019-07-11 08:25:25 +02:00
Daniel Marjamäki a9d61c4ddd Fix Cppcheck warning 2019-07-10 22:08:27 +02:00
Daniel Marjamäki 5f217021ab Another attempt to fix appveyor 2019-07-10 21:30:50 +02:00
Daniel Marjamäki 45844ef962 Try to fix appveyor. Replace int64_t with MathLib::bigint. 2019-07-10 21:26:20 +02:00
Daniel Marjamäki 05d35b063d Function return: Extra check of safe function return values 2019-07-10 20:00:21 +02:00
Daniel Marjamäki c9906125de Safe functions: Check more possible function argument values 2019-07-10 16:59:05 +02:00
Daniel Marjamäki 9f548efbd3 Refactoring: enum class 2019-07-10 15:27:07 +02:00
Daniel Marjamäki 95d65c8c34 Refactoring; enum class 2019-07-10 14:05:16 +02:00
Sebastian 1cb90f925e
gtk.cfg: Add gtk_box_new(), gtk_hbox_new() and gtk_vbox_new() (#1975)
References:
https://developer.gnome.org/gtk3/stable/GtkBox.html#gtk-box-new
https://developer.gnome.org/gtk3/stable/GtkHBox.html#gtk-hbox-new
https://developer.gnome.org/gtk3/stable/GtkVBox.html#gtk-vbox-new

Found by daca@home
2019-07-10 11:28:54 +02:00
Rikard Falkeborn a1a14b8465 Fix FP with cast pointer to free() (#1961)
This fixes false positives when the pointer passed to free() (or similar
deallocation functions) is cast using a c-style cast.
2019-07-10 09:13:59 +02:00
IOBYTE 7ac22677b8 regression test for daca codeblocks crash (#1974) 2019-07-10 07:16:16 +02:00
Daniel Marjamäki 58076bc672 SymbolDatabase: Better handling of smart pointers 2019-07-09 17:32:19 +02:00
IOBYTE a05dfc9150 fix daca codeblocks crash (#1968)
* fix daca codeblocks crash

* fix the cause of the missing scope
2019-07-09 16:04:22 +02:00
Sebastian 9b1066f0bc donate-cpu.py: Enable sqlite3 library for local includes. (#1973)
Many projects use a local copy of the sqlite3 library and several of
them use local includes.
2019-07-09 15:59:00 +02:00
Daniel Marjamäki 29f5f59242 Revert "Revert "Add MISRA 18.4 check (#1966)""
This reverts commit 9b674fa306.
2019-07-09 15:57:12 +02:00
Georgy Komarov 4eb362352d Fixup MISRA 5.1 (#1969) 2019-07-09 15:53:23 +02:00
Sebastian b2c747cff6
qt.cfg: Add "addWidget()" for classes Q(V|H|)BoxLayout and QGridLayout. (#1972)
Found by daca@home
2019-07-09 12:38:41 +02:00
Daniel Marjamäki b68f50ea25 appveyor: check that cmake builds work also. run test/cli tests. 2019-07-09 07:46:53 +02:00
Daniel Marjamäki 862c4ef87b Symboldatabase: Fix possible null pointer dereference if smart pointer type does not have a scope 2019-07-08 17:43:45 +02:00
Daniel Marjamäki 9b674fa306 Revert "Add MISRA 18.4 check (#1966)"
This reverts commit 3ff7ef0918.
2019-07-08 08:10:25 +02:00
Daniel Marjamäki 44ba9b5caf cmake: turn off Wconversion and Wsign-promo warnings 2019-07-08 08:09:51 +02:00
Georgy Komarov 3ff7ef0918 Add MISRA 18.4 check (#1966)
* Add MISRA 18.4 check

* Fixup

* Quickfix
2019-07-07 21:54:08 +02:00
Daniel Marjamäki a0b22410cf SymbolDatabase: Better handling of smart pointers 2019-07-07 21:52:49 +02:00
Daniel Marjamäki 8a63a5d824 Quick hack to fix appveyor builds 2019-07-07 18:35:44 +02:00
IOBYTE e551057f59 Refactor Tokenizer::simplifyUsing to use continue to reduce indentation (#1967)
* Refactor Tokenizer::simplifyUsing to use continue to reduce indentation

added function findTemplateDeclarationEnd to skip template declarations
to reduce duplicate code

* fix travis build
2019-07-07 18:33:33 +02:00
Sebastian db43dcd601
posix.cfg: Add `<use-retval/>` to pthread_mutex_trylock (#1959)
Ignoring the return value of pthread_mutex_trylock is always a bug.
There is no other way to check if the mutex is locked or not after the
call.
2019-07-07 12:57:02 +02:00
IOBYTE c902c5f688 Fix #9197 (Template name cache: Assertion `tok && tok->str() == ">"' failed.) (#1964) 2019-07-07 10:20:43 +02:00
Paul Fultz II b0d10273ed Fix issue 3695: Handle class pointers
This switches to use lifetime analysis to check for assigning to non-local variables:

```cpp
class test
{
public:

  void f()
  {
    int x;
    this->ptr = &x;
  }

protected:
  int *ptr;
};
```
2019-07-07 10:16:19 +02:00
fu7mu4 28678e2fbf update readmeja.md (#1965)
* add MATCHCOMPILER=yes flag into readme in Japanese

* remove Donations from readmeja.md

* add cmake instructions in Japanese

* minor improvement in Japanese
2019-07-07 08:08:11 +02:00