Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751361AbdFYR1I (ORCPT ); Sun, 25 Jun 2017 13:27:08 -0400 Received: from smtprelay0155.hostedemail.com ([216.40.44.155]:60989 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751184AbdFYR1H (ORCPT ); Sun, 25 Jun 2017 13:27:07 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::,RULES_HIT:41:152:355:379:541:599:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1381:1437:1515:1516:1518:1534:1538:1567:1593:1594:1711:1714:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3622:3866:3867:3868:3870:3871:3872:3874:4250:4321:5007:6119:7903:10004:10400:10848:11232:11658:11914:12679:12740:12895:13069:13161:13229:13311:13357:13894:14659:14721:21080:21433:21627:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: wire23_5b14709191863 X-Filterd-Recvd-Size: 1199 Message-ID: <1498411624.24295.36.camel@perches.com> Subject: Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings From: Joe Perches To: "Enrico Weigelt, metux IT consult" , linux-kernel@vger.kernel.org Date: Sun, 25 Jun 2017 10:27:04 -0700 In-Reply-To: <20170625171230.7613-1-enrico.weigelt@gr13.net> References: <20170625171230.7613-1-enrico.weigelt@gr13.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 427 Lines: 12 On Sun, 2017-06-25 at 19:12 +0200, Enrico Weigelt, metux IT consult wrote: > Adding a new format conversion for *printf() and friends. Every use of %M is going to cause gcc when using __printf to emit a warning like: unknown conversion type character ‘M’ in format [-Wformat=] Beyond that, why is this useful? There can't possibly be any fast-path use. Why not just create a function that does errno/string conversions?