Date: Wed, 31 Oct 2007 00:48:49 GMT From: Pietro Cerutti <gahr@gahr.ch> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/117706: [patch] ports/enlightenment get rid of a couple of warning Message-ID: <200710310048.l9V0mnSf036775@www.freebsd.org> Resent-Message-ID: <200710310050.l9V0o1A9055158@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710310048.l9V0mnSf036775>