Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Oct 2012 13:42:05 GMT
From:      arrowdodger <6yearold@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/172357: [PATCH] devel/ncurses: Fix build with clang
Message-ID:  <201210051342.q95Dg5NN030858@red.freebsd.org>
Resent-Message-ID: <201210051350.q95Do7ad059022@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         172357
>Category:       ports
>Synopsis:       [PATCH] devel/ncurses: Fix build with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 05 13:50:06 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     arrowdodger
>Release:        
>Organization:
>Environment:
>Description:
The code in question is quite strange, i didn't get what developers meant with this, so i just silenced compiler with explicit cast.
>How-To-Repeat:

>Fix:
This is a patch for files/ dir.

Patch attached with submission follows:

diff -ruN c++/cursesm.h_ c++/cursesm.h
--- c++/cursesm.h_	2012-10-05 13:03:04.836549667 +0400
+++ c++/cursesm.h	2012-10-05 13:04:02.611549667 +0400
@@ -639,7 +639,7 @@
 		   const T* p_UserData = STATIC_CAST(T*)(0),
 		   bool with_frame=FALSE,
 		   bool autoDelete_Items=FALSE)
-    : NCursesMenu (Items, with_frame, autoDelete_Items) {
+    : NCursesMenu (reinterpret_cast<NCursesMenuItem **>(Items), with_frame, autoDelete_Items) {
       if (menu)
 	set_user (const_cast<void *>(p_UserData));
   };
@@ -651,7 +651,7 @@
 		   int begin_x = 0,
 		   const T* p_UserData = STATIC_CAST(T*)(0),
 		   bool with_frame=FALSE)
-    : NCursesMenu (Items, nlines, ncols, begin_y, begin_x, with_frame) {
+    : NCursesMenu (reinterpret_cast<NCursesMenuItem **>(Items), nlines, ncols, begin_y, begin_x, with_frame) {
       if (menu)
 	set_user (const_cast<void *>(p_UserData));
   };
diff -ruN c++/cursesm.h_ c++/cursesm.h
--- c++/cursesm.h_	2012-10-05 13:03:04.836549667 +0400
+++ c++/cursesm.h	2012-10-05 13:04:02.611549667 +0400
@@ -639,7 +639,7 @@
 		   const T* p_UserData = STATIC_CAST(T*)(0),
 		   bool with_frame=FALSE,
 		   bool autoDelete_Items=FALSE)
-    : NCursesMenu (Items, with_frame, autoDelete_Items) {
+    : NCursesMenu (reinterpret_cast<NCursesMenuItem **>(Items), with_frame, autoDelete_Items) {
       if (menu)
 	set_user (const_cast<void *>(p_UserData));
   };
@@ -651,7 +651,7 @@
 		   int begin_x = 0,
 		   const T* p_UserData = STATIC_CAST(T*)(0),
 		   bool with_frame=FALSE)
-    : NCursesMenu (Items, nlines, ncols, begin_y, begin_x, with_frame) {
+    : NCursesMenu (reinterpret_cast<NCursesMenuItem **>(Items), nlines, ncols, begin_y, begin_x, with_frame) {
       if (menu)
 	set_user (const_cast<void *>(p_UserData));
   };


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210051342.q95Dg5NN030858>