Return-Path: X-Original-To: apmail-qpid-proton-archive@minotaur.apache.org Delivered-To: apmail-qpid-proton-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 612CF10BD1 for ; Wed, 18 Dec 2013 23:42:07 +0000 (UTC) Received: (qmail 48173 invoked by uid 500); 18 Dec 2013 23:42:07 -0000 Delivered-To: apmail-qpid-proton-archive@qpid.apache.org Received: (qmail 48150 invoked by uid 500); 18 Dec 2013 23:42:07 -0000 Mailing-List: contact proton-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: proton@qpid.apache.org Delivered-To: mailing list proton@qpid.apache.org Received: (qmail 48141 invoked by uid 99); 18 Dec 2013 23:42:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Dec 2013 23:42:07 +0000 Date: Wed, 18 Dec 2013 23:42:06 +0000 (UTC) From: "Frank Quinn (JIRA)" To: proton@qpid.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PROTON-420) Warnings Presented When Using Strict Compiler Flags MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PROTON-420?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1385= 2319#comment-13852319 ]=20 Frank Quinn commented on PROTON-420: ------------------------------------ Attached patch which resolves issues. > Warnings Presented When Using Strict Compiler Flags > --------------------------------------------------- > > Key: PROTON-420 > URL: https://issues.apache.org/jira/browse/PROTON-420 > Project: Qpid Proton > Issue Type: Bug > Components: proton-c > Affects Versions: 0.5 > Environment: GCC 4.4.7 > Reporter: Frank Quinn > Attachments: FIX-Warnings-Presented-When-Using-Strict-Compiler-Fl= ags-PROTON-420.patch > > > Hi Folks, > In our project, we currently use the following compiler flags for gcc (te= sted in version 4.4.7): > -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototy= pes -Werror > Unfortunately this causes problems in recent versions of proton as its he= aders produce some warnings of their own. The ones we have spotted can be r= ecreated using the following code: > #include > #include > int main(){} > Compiled with: > $ gcc -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-p= rototypes -Werror -I./qpid-proton-0.5/proton-c/include/ test.c -o test > cc1: warnings being treated as errors > In file included from test.c:1: > ./qpid-proton-0.5/proton-c/include/proton/error.h:46: error: function dec= laration isn=E2=80=99t a prototype > In file included from test.c:2: > ./qpid-proton-0.5/proton-c/include/proton/messenger.h:458:29: error: "/*"= within comment > ./qpid-proton-0.5/proton-c/include/proton/messenger.h:466:40: error: "/*"= within comment > ./qpid-proton-0.5/proton-c/include/proton/messenger.h:470:32: error: "/*"= within comment > ./qpid-proton-0.5/proton-c/include/proton/messenger.h:475:34: error: "/*"= within comment > test.c:4: error: function declaration isn=E2=80=99t a prototype > The first one can be resolved by changing pn_error() to pn_error(void) an= d the others can be fixed simply by adding some spacing. We typically just = hack our local copies for testing, but we figured it may be better to get t= his into the main code stream if you guys can find the time to put it in. > Cheers, > Frank=20 -- This message was sent by Atlassian JIRA (v6.1.4#6159)