[Bug 190711] New: editors/emacs with CANNA enabled fails to compile on FreeBSD 10.0, using clang

bz-noreply at freebsd.org bz-noreply at freebsd.org
Fri Jun 6 12:41:56 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=190711

            Bug ID: 190711
           Summary: editors/emacs with CANNA enabled fails to compile on
                    FreeBSD 10.0, using clang
           Product: Ports Tree
           Version: Latest
          Hardware: Any
                OS: Any
            Status: Needs Triage
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs at FreeBSD.org
          Reporter: nobu-s at iwate-pu.ac.jp

Created attachment 143453
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=143453&action=edit
A patch file for emacs-24.3/src/canna.c, and should be contianed as a part of
ports patch files

Canna (Japanese kana-kanji conversion engine) support enabled editors/emacs
port fails to compile on FreeBSD 10.0. Perhaps this will cause on 
editors/emacs23. This error seem to be a side-effect using clang.

The compile error is as follows:

canna.c:1583:17: error: non-void function 'count_char' should return a value
      [-Wreturn-type]
  if (len == 0) return;


To fix this problem, change declaration count_char() in canna.c from
static count_char(....) to static void count_char(....). The canna.c 
is created by emacs24.3canna-20130321.diff.gz which is a part of 
distfile. Change is as following:

--- src/canna.c.orig    2014-06-06 21:28:39.576576921 +0900
+++ src/canna.c 2014-06-06 21:29:46.141572668 +0900
@@ -191,7 +191,7 @@
 #if __STDC__
 static Lisp_Object mule_make_string(unsigned char *, int);
 static mule_strlen(unsigned char *, int);
-static count_char(unsigned char *,int, int, int, int *, int *, int *);
+static void count_char(unsigned char *,int, int, int, int *, int *, int *);
 #else /* __STDC__ */
 static Lisp_Object mule_make_string();
 static mule_strlen();
@@ -1573,6 +1573,9 @@

 /* count number of characters */
 static
+#if __STDC__
+void
+#endif
 count_char(p,len,pos,rev,clen,cpos,crev)
 unsigned char *p;
 int len,pos,rev,*clen,*cpos,*crev;

Also, I attach this patch for editors/emacs/files/patch-src_canna.c

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list