Commit Graph

104 Commits

Author SHA1 Message Date
pmisik 9c8b0c2c90 Workaround for syntax error on Microsoft specific __pragma keyword (#982)
__pragma is Microsoft specific keyword equivalent to C99 _Pragma operator
https://msdn.microsoft.com/en-us/library/d9x1s805.aspx
https://gcc.gnu.org/onlinedocs/cpp/Pragmas.html
http://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-pragmas

It seems cppcheck does not support _Pragma at the moment.

This change will fix syntax error on code that looks like this:

 #define MY_DEPRECATED_ENUM(X) X __pragma(deprecated(X))
enum myEnum
{
    myEnum_1 = 1,
    MY_DEPRECATED_ENUM(myEnum_2) = 2,
    myEnum_3,
    myEnum_4,
};
int main()
{
    myEnum a = myEnum_3;
    printf("%d", a);
    return 0;
}

This change was fiscussed here: https://sourceforge.net/p/cppcheck/discussion/general/thread/1808a46b/
2017-10-25 14:40:00 +02:00
orbitcowboy 91202c47e6 windows.cfg: Added more returnValue-types. 2017-10-05 11:55:27 +02:00
orbitcowboy 7a56cfbb66 windows.cfg: Added support for more functions. 2017-09-19 21:17:15 +02:00
Daniel Marjamäki b9b47809f9 Fixed #8197 (iscast: '(b)&1' is not a cast) 2017-09-08 22:52:16 +02:00
orbitcowboy bf9980b7e0 windows.cfg: Added more returnValue-types. 2017-08-03 09:57:12 +02:00
Daniel Marjamäki 7875054f36 Fixed #8078 (cppcheck-cfg.rng outdated) 2017-07-23 12:09:41 +02:00
Daniel Marjamäki 101303a179 Fixed #6513 (Resource leak: hSocket - false positive / enhancement needed) 2017-07-02 08:39:48 +02:00
Daniel Marjamäki 5fb59a8063 windows.cfg: reordering of podtypes and defines 2017-07-02 08:38:07 +02:00
Alexander Mai 389b4cdf99 Remove atrribute to cure FP. Run astyle 2017-05-29 20:04:34 +02:00
Alexander Mai 1225b4b25a Fix false positive 2017-05-03 16:34:20 +02:00
Alexander Mai 40a5f78154 Change attributes for 2nd arg of GetTempPath 2017-05-01 20:43:03 +02:00
Alexander Mai 765a9c8660 Remove attribute from _wfopen_s,_tfopen_s to avoid false positives 2017-05-01 19:28:24 +02:00
Alexander Mai df19d2ba5b Remove attribute from GetTempPath,GetTempPathW,GetTempPathA 2017-04-30 20:38:28 +02:00
orbitcowboy c44b055fc1 windows.cfg: Added support for CreateDirectory and RemoveDirectory functions. 2017-04-19 09:42:32 +02:00
orbitcowboy dd0158ee63 std.cfg and windows.cfg: Improved support for localtime functions. 2017-04-19 09:27:24 +02:00
orbitcowboy 16f9e1646c windows.cfg: Improved support for string compar functions. 2017-03-31 08:40:41 +02:00
orbitcowboy f31e2e6696 windows.cfg: Improved support for string-copy functions. 2017-03-31 08:25:56 +02:00
orbitcowboy 93816a63a8 windows.cfg: Improved support for stat() and fstat() functions. 2017-03-29 13:30:12 +02:00
orbitcowboy 6111b38ebb std.cfg and windows.cfg: Improved support for freopen-functions. 2017-03-19 18:23:31 +01:00
orbitcowboy e569d96169 windows.cfg: Added support for _tcsftime(). 2017-03-08 08:53:05 +01:00
orbitcowboy 0bd46ec831 windows.cfg: Added support for _strftime_l() and _wcsftime_l(). 2017-03-08 08:49:13 +01:00
orbitcowboy fef52f2ea1 windows.cfg: Added support for _mbsrchr(). 2017-02-23 13:43:30 +01:00
orbitcowboy b4733a76bd windows.cfg: Added missing _tcsclen_l() function name. 2017-02-23 13:25:50 +01:00
orbitcowboy 6ea520a561 windows.cfg: Added support for strlen()-functions. 2017-02-23 13:23:53 +01:00
orbitcowboy 245da75a2f windows.cfg: Added support for more strdup and malloc functions. 2017-02-23 08:56:13 +01:00
orbitcowboy 6db99d105f windows.cfg: Added support for FindFirstFileEx. 2017-02-22 15:52:39 +01:00
orbitcowboy 26f0ee6703 windows.cfg and gnu.cfg: Improved support for strtok-functions. 2017-02-22 10:27:05 +01:00
PKEuS 7de055361c windows.cfg: Added several functions 2017-02-07 19:08:24 +01:00
PKEuS ae444d7e78 windows.cfg: Added PostMessage() 2017-02-02 13:23:37 +01:00
orbitcowboy 00fd38967f windows.cfg: SetEnvironmentVariable() the second parameter is allowed to be NULL. 2016-12-22 13:46:12 +01:00
orbitcowboy df5c815b1b windows.cfg: Added support for _strnicmp() functions. 2016-12-22 11:19:01 +01:00
orbitcowboy daacc0959e windows.cfg: Updated comments. There are no functional changes. 2016-12-16 17:22:37 +01:00
orbitcowboy 227049a6b1 windows.cfg: Added support for _swap(). 2016-12-16 16:58:42 +01:00
orbitcowboy af1398900c windows.cfg: Improved support for _open() and _close() functions. 2016-12-06 13:50:45 +01:00
orbitcowboy 6829a8da14 posix.cfg and windows.cfg: Added support for memccpy(). 2016-12-05 16:46:49 +01:00
orbitcowboy 942b5cdc20 windows.cfg: Improved configuration by using <valid>-tags. 2016-12-05 10:43:07 +01:00
orbitcowboy afb962575b windows.cfg: Added support for _mbsstr(),_tcsstr() and _mbsstr_l(). 2016-12-02 09:06:02 +01:00
orbitcowboy df0f5e3f39 windows.cfg: Removed not needed <use-retval/> configurations. 2016-11-29 10:07:35 +01:00
orbitcowboy b964513611 windows.cfg: Added support for more functions like SetupDiGetClassDevs(). 2016-11-29 09:18:08 +01:00
orbitcowboy 7b1ed9f415 windows.cfg and posix.cfg: Added more <use-retval/> configurations. 2016-11-28 16:58:33 +01:00
orbitcowboy 55ae961ac2 std.cfg and windows.cfg: Improved support for <use-retval/> for functions like ftell(), [f]get[w]c(). 2016-11-26 21:31:15 +01:00
orbitcowboy 83d0b42c66 windows.cfg: Ensure the return value of _wfopen_s() and _tfopen_s() is taken into account as well. 2016-11-26 16:25:19 +01:00
orbitcowboy 5b1f112195 windows.cfg: Added support for GetTempPath(). 2016-11-22 08:32:11 +01:00
orbitcowboy e94407fbce windows.cfg: Added support for more functions. 2016-11-18 11:28:34 +01:00
orbitcowboy d95a4d83bc windows.cfg: Added support for FindClose() and FindFirstFile(). 2016-10-27 09:36:33 +02:00
orbitcowboy 6b168aba14 windows.cfg: Added support for swprintf_s(). 2016-10-25 17:03:30 +02:00
orbitcowboy 4130207edc posix.cfg and windows.cfg: Added support for more functions like _popen(). 2016-10-21 11:43:01 +02:00
orbitcowboy 340af57028 windows.cfg: Added missing argument. 2016-10-21 09:52:45 +02:00
orbitcowboy 73facf927b windows.cfg: Added support for CreateWaitableTimer(), SetWaitableTimer() and WaitForSingleObject(). 2016-10-21 09:38:14 +02:00
orbitcowboy 56317fe884 windows.cfg: No real changes. Cleanup a comment. 2016-10-21 08:53:44 +02:00