Click here to Skip to main content
15,908,776 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
kalberts13-May-20 1:42
kalberts13-May-20 1:42 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
Greg Utas13-May-20 1:46
professionalGreg Utas13-May-20 1:46 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
Stuart Dootson13-May-20 2:30
professionalStuart Dootson13-May-20 2:30 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
Greg Utas13-May-20 2:12
professionalGreg Utas13-May-20 2:12 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
Stuart Dootson13-May-20 2:38
professionalStuart Dootson13-May-20 2:38 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
Greg Utas13-May-20 2:54
professionalGreg Utas13-May-20 2:54 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
Greg Utas13-May-20 3:09
professionalGreg Utas13-May-20 3:09 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
Stuart Dootson13-May-20 3:22
professionalStuart Dootson13-May-20 3:22 
I've uploaded my (very minimal) code & have to confess I'm perplexed at some of the 'defects' Coverity raises:
  1. Apparently, this line of code raises an exception (which isn't caught in main, as I don't use a global exception handler).
    C++
    std::wostringstream oss;

    Trouble is... that statement doesn't raise an exception... I've looked at the source code for wostringstream (and the associated classes), and while an exception can be raised if the stream's state is set to 'bad' or 'fail', the code path that Coverity is complaining about is setting the stream state to 'good', using a static constexpr value (goodbit, as seen here). Maybe Coverity doesn't understand what constexpr means?
  2. This one is fair enough (although slightly trivial?) - Coverity moans at me for using std::hex to change the default base output by a std::ostream and not restoring the old format. That's one of the reasons I prefer using libfmt (soon to be part of C++20 - yay!) rather than plain old iostreams...
I've used clang-tidy a lot, as well as the static analyzer built into clang, and they haven't raised false positives like this...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: Coverity Scan for Visual Studio / C++ Pin
kalberts13-May-20 3:51
kalberts13-May-20 3:51 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
Stuart Dootson13-May-20 4:47
professionalStuart Dootson13-May-20 4:47 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
kalberts13-May-20 5:25
kalberts13-May-20 5:25 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
User 4041113-May-20 20:41
User 4041113-May-20 20:41 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
Greg Utas14-May-20 0:17
professionalGreg Utas14-May-20 0:17 
GeneralMessage Closed Pin
14-May-20 0:25
User 4041114-May-20 0:25 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
Greg Utas14-May-20 0:33
professionalGreg Utas14-May-20 0:33 
GeneralSo I am a little depressed by my COVID lockdown weight gain... PinPopular
DRHuff12-May-20 5:47
DRHuff12-May-20 5:47 
GeneralRe: So I am a little depressed by my COVID lockdown weight gain... Pin
den2k8812-May-20 5:51
professionalden2k8812-May-20 5:51 
GeneralRe: So I am a little depressed by my COVID lockdown weight gain... Pin
Mike Hankey12-May-20 6:13
mveMike Hankey12-May-20 6:13 
GeneralRe: So I am a little depressed by my COVID lockdown weight gain... Pin
lopatir12-May-20 7:08
lopatir12-May-20 7:08 
GeneralRe: So I am a little depressed by my COVID lockdown weight gain... Pin
Mike Hankey12-May-20 7:19
mveMike Hankey12-May-20 7:19 
GeneralRe: So I am a little depressed by my COVID lockdown weight gain... Pin
lopatir12-May-20 7:24
lopatir12-May-20 7:24 
GeneralRe: So I am a little depressed by my COVID lockdown weight gain... Pin
Mike Hankey12-May-20 7:59
mveMike Hankey12-May-20 7:59 
GeneralRe: So I am a little depressed by my COVID lockdown weight gain... Pin
Slacker00712-May-20 6:32
professionalSlacker00712-May-20 6:32 
JokeRe: So I am a little depressed by my COVID lockdown weight gain... Pin
PIEBALDconsult12-May-20 12:27
mvePIEBALDconsult12-May-20 12:27 
GeneralThought of the Day Pin
OriginalGriff12-May-20 4:46
mveOriginalGriff12-May-20 4:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.