2016-12-21 4 views
1

난 항상이 경고를 얻을 : https://gist.githubusercontent.com/jS5t3r/ccb8a6e3db18d5133d37986b8979baef/raw/f4750f5ac3211b0560d27b035d31542877669e07/warnings속성 표 경고 경고를 제거하는 방법은 무엇입니까?

을 내가

  • 아치 리눅스
  • GCC (GCC)를 사용하고 6.2.1 20160830

3.0 wxwidget 나는 그 플래그를 사용 편집 용

WXWIDGETSFLAGS=`wx-config --gl-libs --cxxflags --libs std stc propgrid richtext` 

경고 :

g++ `wx-config --gl-libs --cxxflags --libs std stc propgrid richtext` -std=c++11 -Wall -Iinclude source/wxwidget/GUIMemLayMgr.h source/wxwidget/gui.h source/wxwidget/GUIMemLayMgr.cpp source/wxwidget/gui.cpp source/wxwidget/main.cpp -o output/wxwidget 
In file included from /usr/include/wx-3.0/wx/propgrid/propgrid.h:26:0, 
      from source/wxwidget/gui.h:31, 
      from source/wxwidget/GUIMemLayMgr.h:9: 
/usr/include/wx-3.0/wx/propgrid/property.h: In member function 'void wxPGChoices::Set(const wxArrayString&, const wxArrayInt&)': 
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress] 
    if (&values) 
       ^
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress] 
In file included from /usr/include/wx-3.0/wx/propgrid/propgrid.h:26:0, 
      from source/wxwidget/gui.h:31: 
/usr/include/wx-3.0/wx/propgrid/property.h: In member function 'void wxPGChoices::Set(const wxArrayString&, const wxArrayInt&)': 
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress] 
    if (&values) 
       ^
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress] 
In file included from /usr/include/wx-3.0/wx/propgrid/propgrid.h:26:0, 
      from source/wxwidget/gui.h:31, 
      from source/wxwidget/GUIMemLayMgr.h:9, 
      from source/wxwidget/GUIMemLayMgr.cpp:1: 
/usr/include/wx-3.0/wx/propgrid/property.h: In member function 'void wxPGChoices::Set(const wxArrayString&, const wxArrayInt&)': 
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress] 
    if (&values) 
       ^
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress] 
In file included from /usr/include/wx-3.0/wx/propgrid/propgrid.h:26:0, 
      from source/wxwidget/gui.h:31, 
      from source/wxwidget/gui.cpp:8: 
/usr/include/wx-3.0/wx/propgrid/property.h: In member function 'void wxPGChoices::Set(const wxArrayString&, const wxArrayInt&)': 
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress] 
    if (&values) 
       ^
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress] 
In file included from /usr/include/wx-3.0/wx/propgrid/propgrid.h:26:0, 
      from source/wxwidget/gui.h:31, 
      from source/wxwidget/main.cpp:22: 
/usr/include/wx-3.0/wx/propgrid/property.h: In member function 'void wxPGChoices::Set(const wxArrayString&, const wxArrayInt&)': 
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress] 
    if (&values) 
       ^
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress] 
+0

코드를 보지 않고도 무언가를 말하는 것은 매우 어렵습니다. 그러나 단지 경고이며 progrm이 정상적으로 실행되면 무시할 수 있습니다. – Igor

+0

외부 링크를 사용하는 대신 질문에 오류 메시지를 포함시켜야합니다. –

+0

@Igor 경고를 무시하지 않을 것입니다. – j35t3r

답변

3

이것은 3.0.2 이후 인 Optimize wxPGChoices::Set method 커밋에서 수정되었습니다. 그것을 사용하려면 최신 3.0 분기를 자식 또는 3.1.0 버전에서 가져와야합니다. 기본적으로 그 커밋 이후의 모든 것입니다.

+0

wx-config --version 3.0.2이 버전을 사용하고 있습니다. – j35t3r

+0

간단한 대답은 "3.1.0'"을 사용하는 것입니다. – catalin

0

는 내가 지금은 잘 작동

#include <wx/propgrid/propgrid.h> 

에서

#include <wx-3.0/wx/propgrid/propgrid.h> 

에 포함 바뀌었다.

+0

올바른 방법이 아닌 것 같습니다. 새 헤더에 해당하는 소스 파일을 사용하지 않고 헤더를 변경하는 것은 좋지 않습니다. – catalin

+0

이전 주석이 말하는 것 외에, 이것은 전혀 전혀 변화시킬 수 없습니다 ... –

+0

@ catalog 나는 를 사용하면 3.0.2보다 오래된 wxwidget 버전을 사용한다고 생각합니다 . 이 해킹 핵으로 3.0.2를 사용하고 있습니다. 어떻게 해결해야합니까? – j35t3r