From nobody@FreeBSD.org  Wed Oct 31 00:48:51 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 37B0816A418
	for <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <gahr@gahr.ch>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] ports/enlightenment get rid of a couple of warning
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         117706
>Category:       ports
>Synopsis:       [patch] x11-wm/enlightenment get rid of a couple of warning
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    vanilla
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 31 00:50:00 UTC 2007
>Closed-Date:    Wed Dec 12 03:45:44 UTC 2007
>Last-Modified:  Wed Dec 12 03:50:03 UTC 2007
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->vanilla 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Oct 31 06:32:13 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117706 

From: Pietro Cerutti <gahr@gahr.ch>
To: bug-followup@FreeBSD.org,  gahr@gahr.ch
Cc:  
Subject: Re: ports/117706: [patch] x11-wm/enlightenment get rid of a couple
 of warning
Date: Sat, 03 Nov 2007 23:48:43 +0100

 This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
 --------------enig3CAC256B97F2C64A020F25CF
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: quoted-printable
 
 Here's the patch (forget about the messed-up crap above):
 
 http://www.gahr.ch/FreeBSD/patches/117706_enlightenment_patch-src-lang.c
 
 --=20
 Pietro Cerutti
 
 PGP Public Key:
 http://gahr.ch/pgp
 
 
 --------------enig3CAC256B97F2C64A020F25CF
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: OpenPGP digital signature
 Content-Disposition: attachment; filename="signature.asc"
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.7 (FreeBSD)
 
 iD8DBQFHLPrPwMJqmJVx944RCoV2AJ47Nlfz8fuFv75Wm6z6nukUNtFBFACgnmWn
 udLWkIC1ifCeK+feAWC0V6M=
 =ZRsq
 -----END PGP SIGNATURE-----
 
 --------------enig3CAC256B97F2C64A020F25CF--
State-Changed-From-To: open->closed 
State-Changed-By: vanilla 
State-Changed-When: Wed Dec 12 03:45:43 UTC 2007 
State-Changed-Why:  
Committed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=117706 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/117706: commit references a PR
Date: Wed, 12 Dec 2007 03:45:18 +0000 (UTC)

 vanilla     2007-12-12 03:45:10 UTC
 
   FreeBSD ports repository
 
   Modified files:
     x11-wm/enlightenment Makefile 
   Added files:
     x11-wm/enlightenment/files patch-src_lang.c 
   Removed files:
     x11-wm/enlightenment/files patch-e_gen_menu 
   Log:
   1: add a patch to get rid of compile warning.
   2: remove unneeded patch.
   
   PR:             ports/117706, ports/117794
   Submitted by:   Pietro Cerutti <gahr.at.gahr.ch>
   
   Revision  Changes    Path
   1.102     +1 -5      ports/x11-wm/enlightenment/Makefile
   1.7       +0 -11     ports/x11-wm/enlightenment/files/patch-e_gen_menu (dead)
   1.1       +44 -0     ports/x11-wm/enlightenment/files/patch-src_lang.c (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
