Bug 172216 - mail/altermime fails to build using clang
Summary: mail/altermime fails to build using clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ion-Mihai "IOnut" Tetcu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-01 19:00 UTC by Miklos Magyari
Modified: 2012-11-30 22:44 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miklos Magyari 2012-10-01 19:00:12 UTC
mail/altermime fails to build using clang:

[...snip...]

===>  Building for altermime-0.3.11.a1
clang -Wall -Werror -g -I. -O2  -c strstack.c
clang -Wall -Werror -g -I. -O2  -c mime_alter.c
clang -Wall -Werror -g -I. -O2  -c ffget.c
ffget.c:553:20: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
                                if ( (*crlfpos == '\r') )
                                      ~~~~~~~~~^~~~~~~
ffget.c:553:20: note: remove extraneous parentheses around the comparison to silence this warning
                                if ( (*crlfpos == '\r') )
                                     ~         ^      ~
ffget.c:553:20: note: use '=' to turn this equality comparison into an assignment
                                if ( (*crlfpos == '\r') )
                                               ^~
                                               =
1 error generated.
*** [ffget.o] Error code 1

Stop in /usr/ports/mail/altermime/work/altermime-0.3.11.a1.
*** [do-build] Error code 1

Stop in /usr/ports/mail/altermime.
*** [/usr/ports/mail/altermime/work/.build_done.altermime._usr_local] Error code 1

Stop in /usr/ports/mail/altermime.

Fix: A source patch under files/

# cat files/patch-::ffget.c


-                               if ( (*crlfpos == '\r') )
+                               if ( *crlfpos == '\r' )
                                {
                                        f->linebreak = FFGET_LINEBREAK_CR;
                                        snprintf(f->lastbreak,sizeof(f->lastbreak),"\r");--SpFPNNabgQPyNncBF056ZxTcRG5oiLbFXHWOW4UzwjA9rUM2
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- ffget.c.orig        2012-10-01 19:45:30.000000000 +0200
+++ ffget.c     2012-10-01 19:45:51.000000000 +0200
@@ -550,7 +550,7 @@
                                // if we have another \r after it, in which case, we
                                // turn on SINGLE_DELIMETER_MODE.
How-To-Repeat: # cd /usr/ports/mail/altermime
# make
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-10-01 19:00:34 UTC
Responsible Changed
From-To: freebsd-ports-bugs->itetcu

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Ion-Mihai "IOnut" Tetcu freebsd_committer freebsd_triage 2012-11-30 22:44:38 UTC
State Changed
From-To: open->closed

Committed. Thanks!