From: Junio C Hamano Date: Mon, 13 Feb 2017 23:48:07 GMT Subject: Re: [PATCH] clean: use warning_errno() when appropriate Message-ID: In-Reply-To: <20170213222210.dtfnxbbi77tsx4a6@sigill.intra.peff.net> Jeff King writes: > So in that sense doing the errno dance as close to the caller who cares > is the most _obvious_ thing, even if it isn't the shortest. Yup. > It would be nice if there was a way to annotate a function as > errno-safe, and then transitively compute which other functions were > errno-safe when they do not call any errno-unsafe function. I don't know > if any static analyzers allow that kind of custom annotation, though > (and also I wonder whether the cost/benefit of maintaining those > annotations would be worth it). Double yup.