From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Oct 31 00:50:01 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C9A016A421 for ; Wed, 31 Oct 2007 00:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5C5D913C4AA for ; Wed, 31 Oct 2007 00:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9V0o106055159 for ; Wed, 31 Oct 2007 00:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9V0o1A9055158; Wed, 31 Oct 2007 00:50:01 GMT (envelope-from gnats) Resent-Date: Wed, 31 Oct 2007 00:50:01 GMT Resent-Message-Id: <200710310050.l9V0o1A9055158@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, Pietro Cerutti Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37B0816A418 for ; Wed, 31 Oct 2007 00:48:51 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 2693013C49D for ; Wed, 31 Oct 2007 00:48:51 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l9V0mowu036776 for ; Wed, 31 Oct 2007 00:48:50 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l9V0mnSf036775; Wed, 31 Oct 2007 00:48:49 GMT (envelope-from nobody) Message-Id: <200710310048.l9V0mnSf036775@www.freebsd.org> Date: Wed, 31 Oct 2007 00:48:49 GMT From: Pietro Cerutti To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/117706: [patch] ports/enlightenment get rid of a couple of warning X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2007 00:50:01 -0000 >Number: 117706 >Category: ports >Synopsis: [patch] ports/enlightenment get rid of a couple of warning >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 31 00:50:00 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Pietro Cerutti >Release: 6.2-STABLE >Organization: Bern University of Applied Sciences >Environment: FreeBSD gahrtop.localhost 6.2-STABLE FreeBSD 6.2-STABLE #3: Wed Oct 24 08:30:39 CEST 2007 root@gahrtop.localhost:/usr/obj/usr/src/sys/MSI1034 i386 >Description: Enlightenment, apparently for no particular reason, casts a few (const char *)'s to (char *) array before passing them to iconv(3), which expects a (const char *) as 2nd argument. This leads to some warnings which we could get rid of. >How-To-Repeat: cd /usr/ports/x11-wm/enlightenment && make | grep warning >Fix: add this patch to ${FILESDIR} /*** BEGIN patch-src-lang.c ***/ --- src/lang.c.orig 2007-10-06 09:16:39.000000000 +0200 +++ src/lang.c 2007-10-31 01:40:09.000000000 +0100 @@ -53,10 +53,11 @@ Eiconv(iconv_t icd, const char *txt, size_t len) { char buf[4096]; - char *pi, *po; + const char *pi; + char *po; size_t err, ni, no; - pi = (char *)txt; + pi = txt; po = buf; ni = (len > 0) ? len : strlen(txt); if (!icd) @@ -202,11 +203,12 @@ EwcStrToWcs(const char *str, int len, wchar_t * wcs, int wcl) { #if HAVE_ICONV - char *pi, *po; + const char *pi; + char *po; size_t ni, no, rc; char buf[4096]; - pi = (char *)str; + pi = str; ni = len; if (!wcs) @@ -242,10 +244,10 @@ EwcWcsToStr(const wchar_t * wcs, int wcl, char *str, int len) { #if HAVE_ICONV - char *pi; + const char *pi; size_t ni, no, rc; - pi = (char *)wcs; + pi = (const char *)wcs; ni = wcl * sizeof(wchar_t); no = len; rc = iconv(iconv_cd_wcs2str, &pi, &ni, &str, &no); /*** END patch-src-lang.c ***/ >Release-Note: >Audit-Trail: >Unformatted: