fix NULL pointers derefs that broke in clang.
from maintainer
This commit is contained in:
parent
917ffa83d6
commit
16410e9347
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.44 2017/11/21 00:12:59 naddy Exp $
|
||||
# $OpenBSD: Makefile,v 1.45 2017/11/27 22:13:47 espie Exp $
|
||||
|
||||
BROKEN-alpha= sqvm.cpp:394:1: internal compiler error: Segmentation fault
|
||||
BROKEN-arm= wxwidgets va_list c++ mangling requires gcc < 4.4
|
||||
@ -7,7 +7,7 @@ COMMENT= Code::Blocks C/C++ IDE
|
||||
V= 16.01
|
||||
DISTNAME= codeblocks_${V}
|
||||
PKGNAME= codeblocks-${V}
|
||||
REVISION= 4
|
||||
REVISION= 5
|
||||
|
||||
WRKDIST= ${WRKDIR}/codeblocks-${V}.release
|
||||
|
||||
@ -73,6 +73,7 @@ CXXFLAGS += -std=c++11 -Wno-c++11-narrowing
|
||||
CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
|
||||
LDFLAGS="-L${LOCALBASE}/lib"
|
||||
CONFIGURE_ARGS= --with-contrib-plugins=all
|
||||
CONFIGURE_ARGS += --enable-debug
|
||||
|
||||
MAKE_ENV= AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
|
||||
AUTOCONF_VERSION=${AUTOCONF_VERSION}
|
||||
|
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-src_sdk_wxpropgrid_include_wx_propgrid_propgrid_h,v 1.1 2017/11/27 22:13:47 espie Exp $
|
||||
|
||||
Remove null references in wxPGProperty
|
||||
from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197888
|
||||
|
||||
Index: src/sdk/wxpropgrid/include/wx/propgrid/propgrid.h
|
||||
--- src/sdk/wxpropgrid/include/wx/propgrid/propgrid.h.orig
|
||||
+++ src/sdk/wxpropgrid/include/wx/propgrid/propgrid.h
|
||||
@@ -700,7 +700,7 @@ class WXDLLIMPEXP_PG wxPGCell (protected)
|
||||
#define wxPG_EMPTY_ARRAYSTRING wxArrayString()
|
||||
|
||||
#if !defined(SWIG)
|
||||
- #define wxPG_LABEL (*((wxString*)NULL)) // Used to tell wxPGProperty to use label as name as well.
|
||||
+ extern WXDLLIMPEXP_PG const wxString wxPG_LABEL; // Used to tell wxPGProperty to use label as name as well.
|
||||
#define wxPG_NULL_BITMAP wxNullBitmap
|
||||
#define wxPG_COLOUR_BLACK (*wxBLACK)
|
||||
#else
|
@ -0,0 +1,34 @@
|
||||
$OpenBSD: patch-src_sdk_wxpropgrid_src_propgrid_cpp,v 1.1 2017/11/27 22:13:47 espie Exp $
|
||||
|
||||
Remove null references in wxPGProperty
|
||||
from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197888
|
||||
|
||||
Index: src/sdk/wxpropgrid/src/propgrid.cpp
|
||||
--- src/sdk/wxpropgrid/src/propgrid.cpp.orig
|
||||
+++ src/sdk/wxpropgrid/src/propgrid.cpp
|
||||
@@ -333,6 +333,8 @@ const wxChar *wxPGTypeName_PyObject = wxT("PyObject");
|
||||
|
||||
static const wxChar* gs_noCellText = wxT("@!");
|
||||
|
||||
+const wxString wxPG_LABEL;
|
||||
+
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
static void wxPGDrawFocusRect( wxDC& dc, const wxRect& rect )
|
||||
@@ -679,13 +681,13 @@ void wxPGProperty::Init()
|
||||
|
||||
void wxPGProperty::Init( const wxString& label, const wxString& name )
|
||||
{
|
||||
- if ( &label != ((wxString*)NULL) )
|
||||
+ if ( label != wxPG_LABEL )
|
||||
m_label = label;
|
||||
|
||||
#ifndef __WXPYTHON__
|
||||
- if ( &name != ((wxString*)NULL) )
|
||||
+ if ( label != wxPG_LABEL )
|
||||
#else
|
||||
- if ( (&name != ((wxString*)NULL)) && name != wxT("_LABEL_AS_NAME") )
|
||||
+ if ( name != wxPG_LABEL && name != wxT("_LABEL_AS_NAME") )
|
||||
#endif
|
||||
DoSetName( name );
|
||||
else
|
Loading…
x
Reference in New Issue
Block a user