|
From: | Rik |
Subject: | Re: V668 lint errors |
Date: | Tue, 1 Jan 2019 19:27:06 -0800 |
On 01/01/2019 06:15 PM,
address@hidden wrote:
Here is an example of code which triggers the V668 message from display.cc. --- Code Start --- instance = new display_info (query); if (instance) singleton_cleanup_list::add (cleanup_instance); --- Code End --- In this case, it seems pretty clear that we could eliminate the test on "instance". For the general case, I'm not so sure. @jwe: Are there any cases you can think of where we might disable exceptions or do something odd where it would not be okay to remove a check for a nullptr? --Rik |
[Prev in Thread] | Current Thread | [Next in Thread] |