Bug 117706 - [patch] x11-wm/enlightenment get rid of a couple of warning
Summary: [patch] x11-wm/enlightenment get rid of a couple of warning
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Vanilla I. Shu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-31 00:50 UTC by Pietro Cerutti
Modified: 2007-12-12 03:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pietro Cerutti 2007-10-31 00:50:00 UTC
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.

Fix: add this patch to ${FILESDIR}

/*** BEGIN patch-src-lang.c ***/



/*** END patch-src-lang.c ***/--J4HxEBX1lEb8reFwExmVQgK8cVADOKKDjE3FG5XJ0CYx2JuE
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- 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);
How-To-Repeat: cd /usr/ports/x11-wm/enlightenment && make | grep warning
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-10-31 06:32:13 UTC
Responsible Changed
From-To: freebsd-ports-bugs->vanilla

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Pietro Cerutti 2007-11-03 22:48:43 UTC
Here's the patch (forget about the messed-up crap above):

http://www.gahr.ch/FreeBSD/patches/117706_enlightenment_patch-src-lang.c

-- 
Pietro Cerutti

PGP Public Key:
http://gahr.ch/pgp
Comment 3 dfilter service freebsd_committer freebsd_triage 2007-12-12 03:45:18 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"
Comment 4 Vanilla I. Shu freebsd_committer freebsd_triage 2007-12-12 03:45:43 UTC
State Changed
From-To: open->closed

Committed, thanks.