From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Oct 10 22:58:20 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A2839F76 for ; Wed, 10 Oct 2012 22:58:20 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [8.8.178.135]) by mx1.freebsd.org (Postfix) with ESMTP id 3EA778FC0C for ; Wed, 10 Oct 2012 22:58:20 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9AMwKXu003748 for ; Wed, 10 Oct 2012 22:58:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9AMwKiJ003747; Wed, 10 Oct 2012 22:58:20 GMT (envelope-from gnats) Resent-Date: Wed, 10 Oct 2012 22:58:20 GMT Resent-Message-Id: <201210102258.q9AMwKiJ003747@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Boris Samorodov Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 38217BEC for ; Wed, 10 Oct 2012 19:00:35 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 21CB08FC12 for ; Wed, 10 Oct 2012 19:00:35 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q9AJ0Y3h079483 for ; Wed, 10 Oct 2012 19:00:34 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id q9AJ0YPO079482; Wed, 10 Oct 2012 19:00:34 GMT (envelope-from nobody) Message-Id: <201210101900.q9AJ0YPO079482@red.freebsd.org> Date: Wed, 10 Oct 2012 19:00:34 GMT From: Boris Samorodov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/172574: [patch] mail/mail2sms: fix build with clang X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Oct 2012 22:58:20 -0000 >Number: 172574 >Category: ports >Synopsis: [patch] mail/mail2sms: fix build with clang >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed Oct 10 22:58:19 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Boris Samorodov >Release: FreeBSD 9-STABLE >Organization: BSDprint >Environment: FreeBSD srv.bb.tel.ru 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #5 r241393: Wed Oct 10 12:27:20 SAMT 2012 bsam@srv.bb.tel.ru:/usr/obj/usr/src/sys/BB i386 >Description: Currently the port does not build with clang: ----- ===> Building for mail2sms-1.3.5 cc -c -O2 -pipe -fno-strict-aliasing -DHAVE_CONFIG_H base64.c cc -c -O2 -pipe -fno-strict-aliasing -DHAVE_CONFIG_H parse.c parse.c:151:17: warning: implicit declaration of function 'base64Decode' is parse.c:329:5: error: non-void function 'process' should return a value [-Wreturn-type] return; /* add error code */ ----- % uname -a FreeBSD bsam.wart.ru 10.0-CURRENT FreeBSD 10.0-CURRENT #36 r241156: Wed Oct 3 13:44:36 SAMT 2012 bsam@bsam.wart.ru:/usr/obj/usr/src/sys/BBX i386 % clang --version FreeBSD clang version 3.2 (trunk 162107) 20120817 Target: i386-unknown-freebsd10.0 Thread model: posix ----- >How-To-Repeat: >Fix: Patch attached with submission follows: Index: files/patch-aa =================================================================== --- files/patch-aa (revision 305677) +++ files/patch-aa (working copy) @@ -23,6 +23,15 @@ { int nlen = strlen(needle); int hlen = strlen(haystack); +@@ -325,7 +326,7 @@ struct body * process(char *mbox, /* + if (use_stdin || !mbox || !strcasecmp(mbox, "NONE")) + fp = stdin; + else if ((fp = fopen(mbox, "r")) == NULL) { +- return; /* add error code */ ++ return -1; /* add error code */ + } + + isinheader = 1; --- mail2sms.1.orig Wed Apr 16 05:22:01 2003 +++ mail2sms.1 Wed Apr 16 05:22:57 2003 @@ -32,7 +32,7 @@ >Release-Note: >Audit-Trail: >Unformatted: