Message ID | 1431937081-20083-2-git-send-email-olivier.matz@6wind.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 25BB7C314; Mon, 18 May 2015 10:18:14 +0200 (CEST) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 8F62A9A9E for <dev@dpdk.org>; Mon, 18 May 2015 10:18:11 +0200 (CEST) Received: by wgfl8 with SMTP id l8so26401868wgf.2 for <dev@dpdk.org>; Mon, 18 May 2015 01:18:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nTK6j0WGJ/X0CKIdXORpP5bvI1JnyU1HwlpSa5cxpDw=; b=TsEyYcQfQaDWPErGxHIAtjRANYlXUfFkamTzybZnbOyPJitB+PUjRUeZOl9eVTI1TN YencZ06FiVfa8ndrOjU0jLPWq/AWwI4hXQ+2T17YChYzFZi4x94X/5S1VkFSpfnwL0U0 6r1rmlVWE47mzZeMafL8QgvXfXIx4gLKfedQfX4BzTgeUo/BmR1Mbosx6M+A7jRXufUw Z8S8LkL6mnq+1wXurAaSj/AZdm4Mefrv3vLRUMbRuhBPdlwMNaw/1Dg7NuhmGBOWpTCJ X0QhjIBIXnXBZff4M8AY0m17WIVNMqTu9VTwF5GA0ekOelwigaGfvOeGzU0SyPRvj8NJ leTw== X-Gm-Message-State: ALoCoQm2XPxNtxF+f/2hYXyYVFXH/dUKbn1LpBF704b048Ygmm3seb1XQD0ch7A8ia+haIsMp3t9 X-Received: by 10.194.200.228 with SMTP id jv4mr41012216wjc.157.1431937091488; Mon, 18 May 2015 01:18:11 -0700 (PDT) Received: from glumotte.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id ck16sm7664735wjb.37.2015.05.18.01.18.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 May 2015 01:18:10 -0700 (PDT) From: Olivier Matz <olivier.matz@6wind.com> To: dev@dpdk.org Date: Mon, 18 May 2015 10:17:58 +0200 Message-Id: <1431937081-20083-2-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1431937081-20083-1-git-send-email-olivier.matz@6wind.com> References: <1431937081-20083-1-git-send-email-olivier.matz@6wind.com> Subject: [dpdk-dev] [PATCH 1/4] examples/bond: fix compilation with clang X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Olivier Matz
May 18, 2015, 8:17 a.m. UTC
Fix the following compilation error:
examples/bond/main.c:717:1: error: control reaches end of
non-void function [-Werror,-Wreturn-type]
The prompt() function does not return anything, so fix its prototype
to be void.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
examples/bond/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Mon, May 18, 2015 at 10:17:58AM +0200, Olivier Matz wrote: > Fix the following compilation error: > > examples/bond/main.c:717:1: error: control reaches end of > non-void function [-Werror,-Wreturn-type] > > The prompt() function does not return anything, so fix its prototype > to be void. > > Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Out of interest, what version of clang throws up this error? /Bruce > --- > examples/bond/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/examples/bond/main.c b/examples/bond/main.c > index e90dc1d..4622283 100644 > --- a/examples/bond/main.c > +++ b/examples/bond/main.c > @@ -705,7 +705,7 @@ cmdline_parse_ctx_t main_ctx[] = { > }; > > /* prompt function, called from main on MASTER lcore */ > -static void *prompt(__attribute__((unused)) void *arg1) > +static void prompt(__attribute__((unused)) void *arg1) > { > struct cmdline *cl; > > -- > 2.1.4 >
Hi Bruce, On 05/18/2015 03:53 PM, Bruce Richardson wrote: > On Mon, May 18, 2015 at 10:17:58AM +0200, Olivier Matz wrote: >> Fix the following compilation error: >> >> examples/bond/main.c:717:1: error: control reaches end of >> non-void function [-Werror,-Wreturn-type] >> >> The prompt() function does not return anything, so fix its prototype >> to be void. >> >> Signed-off-by: Olivier Matz <olivier.matz@6wind.com> > > Out of interest, what version of clang throws up this error? $ clang --version Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based on LLVM 3.5.0) Target: x86_64-pc-linux-gnu Thread model: posix And by the way, the gcc version I used for the other patches of the series: $ gcc --version gcc (Debian 4.9.2-10) 4.9.2 Regards, Olivier > > /Bruce > >> --- >> examples/bond/main.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/examples/bond/main.c b/examples/bond/main.c >> index e90dc1d..4622283 100644 >> --- a/examples/bond/main.c >> +++ b/examples/bond/main.c >> @@ -705,7 +705,7 @@ cmdline_parse_ctx_t main_ctx[] = { >> }; >> >> /* prompt function, called from main on MASTER lcore */ >> -static void *prompt(__attribute__((unused)) void *arg1) >> +static void prompt(__attribute__((unused)) void *arg1) >> { >> struct cmdline *cl; >> >> -- >> 2.1.4 >>
On Mon, May 18, 2015 at 03:57:00PM +0200, Olivier MATZ wrote: > Hi Bruce, > > On 05/18/2015 03:53 PM, Bruce Richardson wrote: > > On Mon, May 18, 2015 at 10:17:58AM +0200, Olivier Matz wrote: > >> Fix the following compilation error: > >> > >> examples/bond/main.c:717:1: error: control reaches end of > >> non-void function [-Werror,-Wreturn-type] > >> > >> The prompt() function does not return anything, so fix its prototype > >> to be void. > >> > >> Signed-off-by: Olivier Matz <olivier.matz@6wind.com> > > > > Out of interest, what version of clang throws up this error? > > $ clang --version > Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based on LLVM 3.5.0) > Target: x86_64-pc-linux-gnu > Thread model: posix > > And by the way, the gcc version I used for the other patches of the > series: > > $ gcc --version > gcc (Debian 4.9.2-10) 4.9.2 > > > Regards, > Olivier > Thanks. I was just curious as I wasn't seeing issues with clang 3.6 on Fedora. /Bruce > > > > /Bruce > > > >> --- > >> examples/bond/main.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/examples/bond/main.c b/examples/bond/main.c > >> index e90dc1d..4622283 100644 > >> --- a/examples/bond/main.c > >> +++ b/examples/bond/main.c > >> @@ -705,7 +705,7 @@ cmdline_parse_ctx_t main_ctx[] = { > >> }; > >> > >> /* prompt function, called from main on MASTER lcore */ > >> -static void *prompt(__attribute__((unused)) void *arg1) > >> +static void prompt(__attribute__((unused)) void *arg1) > >> { > >> struct cmdline *cl; > >> > >> -- > >> 2.1.4 > >>
diff --git a/examples/bond/main.c b/examples/bond/main.c index e90dc1d..4622283 100644 --- a/examples/bond/main.c +++ b/examples/bond/main.c @@ -705,7 +705,7 @@ cmdline_parse_ctx_t main_ctx[] = { }; /* prompt function, called from main on MASTER lcore */ -static void *prompt(__attribute__((unused)) void *arg1) +static void prompt(__attribute__((unused)) void *arg1) { struct cmdline *cl;