Bug 172216

Summary: mail/altermime fails to build using clang
Product: Ports & Packages Reporter: Miklos Magyari <magyarimiki>
Component: Individual Port(s)Assignee: Ion-Mihai "IOnut" Tetcu <itetcu>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

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!