From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23795 invoked by alias); 27 Feb 2019 22:18:18 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 23773 invoked by uid 89); 27 Feb 2019 22:18:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=sk:warn_un, Let, HContent-Transfer-Encoding:8bit X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 27 Feb 2019 22:18:17 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id F3D3E116581 for ; Wed, 27 Feb 2019 17:18:15 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id E-obQZQaFRfo for ; Wed, 27 Feb 2019 17:18:15 -0500 (EST) Received: from murgatroyd.Home (75-166-85-218.hlrn.qwest.net [75.166.85.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id A876C116120 for ; Wed, 27 Feb 2019 17:18:15 -0500 (EST) From: Tom Tromey To: gdb-patches@sourceware.org Subject: [PATCH 0/7] Use warn_unused_result on release methods Date: Wed, 27 Feb 2019 22:18:00 -0000 Message-Id: <20190227221814.17661-1-tromey@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SW-Source: 2019-02/txt/msg00544.txt.bz2 This applies the warn_unused_result attribute to various "release" methods in gdb. The idea here is to avoid the bug where "release" is used when "reset (nullptr)" is meant. This caught one bug, so I consider it a success. Perhaps the new attribute can be used elsewhere as well. Tested by the buildbot. Let me know what you think. thanks, Tom