From patchwork Mon Mar 6 10:35:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Eremin-Solenikov X-Patchwork-Id: 94917 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp1320535qgd; Mon, 6 Mar 2017 02:36:03 -0800 (PST) X-Received: by 10.55.86.134 with SMTP id k128mr13682555qkb.309.1488796562662; Mon, 06 Mar 2017 02:36:02 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id g11si15154199qtb.242.2017.03.06.02.36.02; Mon, 06 Mar 2017 02:36:02 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 27C7763639; Mon, 6 Mar 2017 10:36:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id CCE4C62C7C; Mon, 6 Mar 2017 10:35:57 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 661D062D00; Mon, 6 Mar 2017 10:35:55 +0000 (UTC) Received: from mail-wr0-f182.google.com (mail-wr0-f182.google.com [209.85.128.182]) by lists.linaro.org (Postfix) with ESMTPS id 6071362C40 for ; Mon, 6 Mar 2017 10:35:54 +0000 (UTC) Received: by mail-wr0-f182.google.com with SMTP id u48so113243117wrc.0 for ; Mon, 06 Mar 2017 02:35:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=0uvhMx2swl3wMFKbCq6svydJ+IvE+TJOkwZWV7zzyhY=; b=gSFi1/JB4QwygGezKvpmnyPVjcpv7gGB/gGeDXq9G4GMEtQho4gXF9PitA+zuM4KIq 9A2rZFQkJ7N0Q0R925yF0NJrQ6zIRhDI6upPMFzUCNYzRKXBXv0mc3w952NaSzzHrJ+C JCmZ9Ac6i8PqwnDFZ/hsOojhTmbJdejJffeM2rPQ5l1x9eziLfBBGg+wZ3sixUxobmLE OEv659pe02dwPN70+8aq006hynSaMuVnsgOwK1ljjjUWpljY/aNN8ahdC3B8kSPXqfMJ K0FtJ8hwD0DN6M4jqcGJFSqS8qgRzKOal24oSBv3IQlpWuD1DrTOf7cswVbX+LvlLkrg h8pA== X-Gm-Message-State: AMke39m5wJlYBP9WUZNgQYe23cdr8TdpNqkjwz7YlnJ1cqTMMeu/acvln6/fqiR3mNJqy814PjHXow== X-Received: by 10.223.175.196 with SMTP id y4mr13450706wrd.77.1488796553307; Mon, 06 Mar 2017 02:35:53 -0800 (PST) Received: from forlindon.c.hoisthospitality.com ([109.74.56.122]) by smtp.gmail.com with ESMTPSA id 36sm26408924wrk.57.2017.03.06.02.35.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Mar 2017 02:35:52 -0800 (PST) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Mon, 6 Mar 2017 13:35:50 +0300 Message-Id: <20170306103550.2126-1-dmitry.ereminsolenikov@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [lng-odp] [RFC] api: init: add ODP_PRINTF_FORMAT to odp_log_func_t X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Hint compiler that the odp_log_func_t (and as a result all of ODP_ABORT/_LOG/_ERR/etc) expects a format and a set of arguments. Signed-off-by: Dmitry Eremin-Solenikov --- Currently this patch results in huuuge number of errors from all over the ODP sources. I suggest considering fixing some these errors and then to merge this patch. include/odp/api/spec/init.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 diff --git a/include/odp/api/spec/init.h b/include/odp/api/spec/init.h index 154cdf8f..d6c30837 100644 --- a/include/odp/api/spec/init.h +++ b/include/odp/api/spec/init.h @@ -100,7 +100,7 @@ int odp_override_log(odp_log_level_t level, const char *fmt, ...); void odp_override_abort(void) ODP_NORETURN; /** Replaceable logging function */ -typedef int (*odp_log_func_t)(odp_log_level_t level, const char *fmt, ...); +typedef int (*odp_log_func_t)(odp_log_level_t level, const char *fmt, ...) ODP_PRINTF_FORMAT(2, 3); /** Replaceable abort function */ typedef void (*odp_abort_func_t)(void) ODP_NORETURN;