Basically anything like std::map<int, std::wstring> errorText; seems to be triggering this. I'm using cppcheck 2.10.3 (as provided by codacy)
Thank you!
Sorry, not been able to check for a couple of days. I'm using cppcheck 2.10.3 (as provided by codacy) Looks like the previous poster is having the same problems as I am, and I omitted to include the :: in my original example, so throw ::mynamespace::exceptionobject("message"); would be a better example. Possibly if (cond) { throw ::mynamespace::exceptionobject("message"); } might be necessary. Although having seen the prior post, does look like I needed the :: at the start
Sorry, not been able to check for a couple of days. I'm using cppcheck 2.10.3 (as provided by codacy) I'm not sure how to provide any more detailed code than throw ::mynamespace::exceptionobject("message"); as an example. Possibly if (cond) { throw ::mynamespace::exceptionobject("message"); } might be necessary.
Sorry, not been able to check for a couple of days. I'm using cppcheck 2.10.3 (as provided by codacy) I'm not sure how to provide any more detailed code than throw ::mynamespace::exceptionobject("message"); as an example. Possibly if (cond) { throw ::mynamespace::exceptionobject("message"); } might be necessary.
Sorry, not been able to check for a couple of days. I'm using cppcheck 2.10.3 (as provided by codacy) I'm not sure how to provide any more detailed code than throw ::mynamespace::exceptionobject("message"); as an example. Possibly if (cond) { throw ::mynamespace::exceptionobject("message"); } might be necessary.
Sorry, not been able to check for a couple of days. I'm using cppcheck 2.10.3 (as provided by codacy) I'm not sure how to provide any more detailed code than throw ::mynamespace::exceptionobject("message"); as an example. Possibly if (cond) { throw ::mynamespace::exceptionobject("message"); } might be necessary (not sure how to get the newlines in on that. braces are on their own lines in the code).
Sorry, not been able to check for a couple of days. I'm using cppcheck 2.10.3 (as provided by codacy) I'm not sure how to provide any more detailed code than throw mynamespace::exceptionobject("message"); as an example. Possibly if (cond) { throw mynamespace::exceptionobject("message"); } might be necessary (not sure how to get the newlines in on that. braces are on their own lines in the code).
This sort of code: throw mynamespace::exceptionobject("message"); produces an unusedScopedObject message. Why? The language requires you to write code like this. The fact that the exception object is moved into somewhere magic and then deleted isn't really important. Could this message be switched off for objects constructed and promptly thrown?
i could try but i'd be building on mingw64 so it might take a while
gdb comes up with a lot of "warning: Invalid parameter passed to c runtime function" messages and of course it doesn't crash with -j4 and i had to try with -j5. that crashes but there are no symbols
I'm running on windows with mingw64. I guess I could try that - i can certainly try gdb-ing as is
I have a directory with 9 files in it. I can run cppcheck --force --inline-suppr -I . that/ and it works fine. If I add -j4 to that. boom. segmentation violation after about 6 files of the 9. -j 2 and -j 3 work fine Higher -js also work but can process more files I tried a different directory in the same project (with 34 files), and -j 4 succeeded, although -j 6 failed with segmentation violation) I'm not really sure how to usefully track this down further.
I have a directory with 9 files in it. I can run cppcheck --force --inline-suppr -I . that/ and it works fine. If I add -j4 to that. boom. segmentation violation after about 6 files of the 9. -j 2 and -j 3 work fine Higher -js also work but can process more files I tried a different directory in the same project (with 34 files), and -j 4 succeeded, although -j 6 failed with segmentation violation)
and sorry for mistyping the title!
For this code: class X { int a; int b; public: void init() { a = b = 1; } }; class Y { X x; public: Y() {} }; (which I admit is somewhat dubious), you get this $ cppcheck --enable=warning test.cc Checking test.cc ... test.cc:48:3: warning: Member variable 'Y::x' is not initialized in the constructor. [uninitMemberVar] Y() {} ^ Now I know that X doesn't have a constructor, and it should. However until it DOES have a constructor, I have no way of initialising the member variable concerned, and I don't...
Did you try using unsigned integers for i and j? It might fix this (asking because I'm aware of various static checkers that will produce warnings when you use a signed integer for an array index)
well, i thought i probably shouldn't be writing final at all, as the whole class as final! Thank you for raising a ticket, i shall follow it.
thanks. appreciated
This code: #include <set> struct Somestruct { int a; int b; Somestruct(int a, int b) : a(a), b(b) {} } typedef set<Somestruct> SomeSet; static SomeSet stuff; Somestruct *addit() { std::pair<SomeSet::iterator,bool> result(stuff.insert(Somestruct(1, 2))); Somestruct * impl = const_cast<Somestruct*>(&*result.first); return impl; } generates this output $ cppcheck test.cc Checking test.cc ... test.cc:13:12: error: Returning pointer that will be invalid when returning. [returnDanglingLifetime] return...
So when I have something like struct Y: { virtual void wibble() = 0; virtual ~Y() {} }; struct X final: public Y { void wibble() override; X() {} virtual ~X() { wibble(); } }; gives me the virtualCallInConstructor message. I have to do this: struct Y: { virtual void wibble() = 0; virtual ~Y() {} }; struct X final: public Y { void wibble() override final; X() {} virtual ~X() { wibble(); } }; to resolve it (cppcheck 2.8)
So when I have something like struct Y: { virtual void wibble() = 0; virtual ~Y() {} }; struct X final: public Y { void wibble() override; X() {} virtual ~X() { wibble(); } }; gives me the virtualCallInConstructor message. I have to do this: struct Y: { virtual void wibble() = 0; virtual ~Y() {} }; struct X final: public Y { void wibble() override final; X() {} virtual ~X() { wibble(); } }; to resolve it
This code: #include <set> struct Somestruct { int a; int b; Somestruct(int a, int b) : a(a), b(b) {} } typedef set<Somestruct> SomeSet; static SomeSet stuff; Somestruct *addit() { std::pair<SomeSet::iterator,bool> result(stuff.insert(Somestruct(1, 2))); Somestruct * impl = const_cast<Somestruct*>(&*result.first); return impl; } generates this output $ cppcheck test.cc Checking test.cc ... test.cc:13:12: error: Returning pointer that will be invalid when returning. [returnDanglingLifetime] return...
Adds some changes to show the moduleTitle and m...
Facepalm. forgot to remove trace...
Fix for bug 1317
More thinking
Final removal of MyCom.h dependency, some more ...
More cleanups
Merge with default
Replacing most of the 7-zip myCom functions wit...
Fix merge issue
more removal of 7zip implementation of Com clas...
This fixes some resource leaks with archive han...
Rename data member to reflect purpose better
Null commit to create new branch
Cleanup comments and unused headers
More removals of 7zip dependencies
Cleanup again
Stop resource leak in NMMImport
Yet more cleanup
fixed not remembering password
Small cleanups, out-of-line extractcallback con...
More cleanups and removals of 7zip code
Make password callback use a QString
Use a slightly more standard type in the API
Merge with default
Merge with default
Replace a few more wstring with QString. Mainly...
Use own wrappers round propvariant
Make getFileName and addOutputFileName use QString
Merge with default
Removes all the 7zip property wrappers from arc...
Final removal of 7zip PropVariant and Ustring
Remove Dependency on FileStreams
Final removal of 7zip source code dependency
Start of cleaning up the archive library interface
Merge with default
Yet more refactoring and cleanup
Merge with default
Make callbacks from archive library more QT-ish
Some small cleanups
Merge with default
Merge with default
Merge with default
Fix silly mistake
Fixup merge
Merge with default
fix up for create/mod stuff
Move the code used only for reading application...
Weren't getting warned if you changed an execut...
Merge
Fix not recognising 'add' (1308)
Stop the temp files to delete list growing on e...
Merge with default
Merge with default
Merge
Fix nasty message when starting MO for first time
Small fix to shut up messages about long boost ...
Merge with default
Fix asking for password twice when installing f...
Merge
Merge
First pass at replacing CloseMOStyle with an en...
Merge
Fix up merge mess
cleanup
Merge
Clean up of fixes for custom executable window
Fix the executable configuration flags going aw...
Cleanup of archive handling.
Merge
Fix decoding issue with .zip files with a .7z e...
Clean up the Multi writer class
Merge
Simply script a little
Extract multiple copies of file from archive
More work on the executables list
Been trying other things. I have now managed to make passing a list not crash. However,...
Been trying other things. I have now managed to make passing a list not crash. However,...