qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chuck Rolke (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-3284) Removed unused variables, which caused the build to break under GCC 4.6
Date Fri, 27 May 2011 13:33:47 GMT

    [ https://issues.apache.org/jira/browse/QPID-3284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040222#comment-13040222
] 

Chuck Rolke commented on QPID-3284:
-----------------------------------

This patch appears to re-install warnings for other users. Specifically:
-            int unused_ret;
-            unused_ret = ::lockf(f, F_ULOCK, 0); // Suppress warnings about ignoring return
value.
+            ::lockf(f, F_ULOCK, 0); // Suppress warnings about ignoring return value.

The return value is now ignored again.
I'd suggest Holtzmann's Rule 7 in http://spinroot.com/gerard/pdf/P10.pdf
Cast the result as void. The patches would read:

+            (void) ::lockf(f, F_ULOCK, 0);

Both problems solved.


> Removed unused variables, which caused the build to break under GCC 4.6
> -----------------------------------------------------------------------
>
>                 Key: QPID-3284
>                 URL: https://issues.apache.org/jira/browse/QPID-3284
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Broker
>    Affects Versions: 0.10
>         Environment: Fedora 15 x86_64.
>            Reporter: Darryl L. Pierce
>            Priority: Blocker
>             Fix For: Future
>
>         Attachments: 0001-Removed-unused-variables.patch
>
>
> There were several variables that were declared and assigned values but whose values
were not used. This caused GCC 4.6.0 to raise a warning, which causes the build to stop.
> This patch removes those unused variables.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Mime
View raw message