Bug 206337 - devel/dee: fix build with clang 3.8.0
Summary: devel/dee: fix build with clang 3.8.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks: 206074
  Show dependency treegraph
 
Reported: 2016-01-17 14:56 UTC by Dimitry Andric
Modified: 2016-01-24 15:35 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (olivierd)


Attachments
Parenthesize journal_iter_is_removed macro so it doesn't cause warnings (1.10 KB, patch)
2016-01-17 14:56 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer 2016-01-17 14:56:08 UTC
Created attachment 165718 [details]
Parenthesize journal_iter_is_removed macro so it doesn't cause warnings

During the exp-run in bug 206074, it was found that devel/dee gives errors with a recent clang 3.8.0 snapshot:

dee-transaction.c:1245:17: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
      g_assert (!journal_iter_is_removed (jiter));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/glib-2.0/glib/gtestutils.h:106:59: note: expanded from macro 'g_assert'
                                             if G_LIKELY (expr) ; else \
                                                          ^~~~
/usr/local/include/glib-2.0/glib/gmacros.h:325:59: note: expanded from macro 'G_LIKELY'
#define G_LIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR(expr), 1))
                                                          ^~~~
/usr/local/include/glib-2.0/glib/gmacros.h:319:8: note: expanded from macro '_G_BOOLEAN_EXPR'
   if (expr)                                    \
       ^~~~
dee-transaction.c:1245:17: note: add parentheses after the '!' to evaluate the comparison first
dee-transaction.c:1245:17: note: add parentheses around left hand side expression to silence this warning
1 error generated.

This is because the journal_iter_is_removed() macro does not have parentheses around its expression.  Here is a patch to fix that.
Comment 1 Olivier Duchateau freebsd_committer 2016-01-24 11:14:40 UTC
Feel free to commit, it's ok for me.
Comment 2 commit-hook freebsd_committer 2016-01-24 14:58:40 UTC
A commit references this bug:

Author: dim
Date: Sun Jan 24 14:57:37 UTC 2016
New revision: 407133
URL: https://svnweb.freebsd.org/changeset/ports/407133

Log:
  Fix warnings from clang 3.8.0 about a non-parenthesized macro in
  devel/dee.

  Approved by:	olivierd (maintainer)
  PR:		206337

Changes:
  head/devel/dee/files/
  head/devel/dee/files/patch-src__dee-transaction.c
Comment 3 commit-hook freebsd_committer 2016-01-24 15:35:01 UTC
A commit references this bug:

Author: feld
Date: Sun Jan 24 15:34:00 UTC 2016
New revision: 407157
URL: https://svnweb.freebsd.org/changeset/ports/407157

Log:
  MFH: r407133

  Fix warnings from clang 3.8.0 about a non-parenthesized macro in
  devel/dee.

  Approved by:	olivierd (maintainer)
  PR:		206337

  Approved by:	ports-secteam (with hat)

Changes:
_U  branches/2016Q1/
  branches/2016Q1/devel/dee/files/