Source: extrema
Severity: minor
Tags: patch
User: pkg-llvm-t...@lists.alioth.debian.org
Usertags: clang-ftbfs

Dear Maintainer,

Your package fails to build with clang instead of gcc.
The attached patch fixes it.

Best regards,
Alexander

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.13-1-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- extrema-4.4.5.dfsg/src/Commands/CMD_grid.cpp	2009-11-05 16:03:02.000000000 -0500
+++ extrema-4.4.5.dfsg-my/src/Commands/CMD_grid.cpp	2014-03-19 15:17:51.581619053 -0400
@@ -167,7 +167,7 @@
     if( dup.size() > 0 )
     {
       if( qualifiers[wxT("MESSAGES")] )
-        ExGlobals::WarningMessage( wxString(wxT("GRID: "))+dup.size()+wxT(" duplicate points found") );
+        ExGlobals::WarningMessage( wxString(wxT("GRID: "))+wxString::Format(wxT("%lu"),dup.size())+wxT(" duplicate points found") );
       for( std::size_t i=0; i<dup.size(); ++i )
       {
         std::size_t j = dup.size()-i-1;
--- extrema-4.4.5.dfsg/src/Commands/CMD_set.cpp	2009-11-05 16:03:02.000000000 -0500
+++ extrema-4.4.5.dfsg-my/src/Commands/CMD_set.cpp	2014-03-19 15:20:17.234848993 -0400
@@ -3290,7 +3290,7 @@
   {
     wxString tmp( wxT("unknown keyword: ") );
     tmp += keyword;
-    throw ECommandError( command+tmp.c_str() );
+    throw ECommandError( command+tmp );
   }
   if( multipleEntries )goto TOP;
 }
--- extrema-4.4.5.dfsg/src/Graphics/GRA_axis.cpp	2009-11-05 16:03:01.000000000 -0500
+++ extrema-4.4.5.dfsg-my/src/Graphics/GRA_axis.cpp	2014-03-19 15:38:46.336585282 -0400
@@ -1103,7 +1103,8 @@
   //
   if( nPos <= 0 )return wxString(wxT(" "));
   wxChar digit[] = wxT("0123456789");
-  wxChar minus=wxT('-'), dec=wxT('.'), blank=wxT(' '), star=wxT('*');
+  wxChar minus=wxT('-'), dec=wxT('.'), star=wxT('*'); 
+  wxUniChar blank=wxT(' ');
   //
   // determine nint, the number of digits to the left of the
   // decimal point, and ndec2, the number of decimal places,
--- extrema-4.4.5.dfsg/src/Graphics/GRA_setOfCharacteristics.cpp	2009-11-05 16:03:01.000000000 -0500
+++ extrema-4.4.5.dfsg-my/src/Graphics/GRA_setOfCharacteristics.cpp	2014-03-19 15:41:47.871857948 -0400
@@ -193,7 +193,7 @@
 }
 
 GRA_characteristic *GRA_setOfCharacteristics::Get( wxString const &name ) const
-{ return Get( name.c_str() ); }
+{ return Get( name ); }
 
 GRA_characteristic *GRA_setOfCharacteristics::Get( wxChar const *name ) const
 {
--- extrema-4.4.5.dfsg/src/Graphics/GRA_stringCharacteristic.cpp	2009-11-05 16:03:01.000000000 -0500
+++ extrema-4.4.5.dfsg-my/src/Graphics/GRA_stringCharacteristic.cpp	2014-03-19 15:43:19.833136541 -0400
@@ -48,7 +48,7 @@
   std::size_t length = s.size();
   for( std::size_t i=0; i<length; ++i )
   {
-    switch ( s[i] )
+    switch ( static_cast<char>(s[i]) )
     {
       case wxT('<'):
         result += wxT("&lt;");
--- extrema-4.4.5.dfsg/src/Variables/Variable.cpp	2009-11-05 16:03:05.000000000 -0500
+++ extrema-4.4.5.dfsg-my/src/Variables/Variable.cpp	2014-03-19 16:40:37.790558783 -0400
@@ -100,7 +100,7 @@
     else if( newState == -20 )
       throw EVariableError( wxT("no variable name was given") );
     else if( newState == -30 )
-      throw EVariableError( uName[i]+wxT(" is an invalid character in ")+name );
+      throw EVariableError( uName[i]+wxString(wxT(" is an invalid character in "))+name );
     ++i;
   }
   if( start == -1 )throw EVariableError(wxT("no variable name was given"));
--- extrema-4.4.5.dfsg/src/wxForms/AnalysisMessagePanel.cpp	2009-11-05 16:03:02.000000000 -0500
+++ extrema-4.4.5.dfsg-my/src/wxForms/AnalysisMessagePanel.cpp	2014-03-19 16:42:28.400082752 -0400
@@ -83,7 +83,7 @@
   std::ios_base::openmode mode;
   fd = new wxFileDialog( this, wxT("Save command history"), wxT(""), wxT(""),
                          wxT("Text files (*.txt)|*.txt|Any file (*.*)|*.*"),
-                         wxSAVE|wxOVERWRITE_PROMPT|wxCHANGE_DIR );
+                         wxFD_SAVE|wxFD_OVERWRITE_PROMPT|wxFD_CHANGE_DIR );
   mode = std::ios_base::out;
   wxString filename;
   if( fd->ShowModal() == wxID_OK )filename = fd->GetPath();
--- extrema-4.4.5.dfsg/src/wxForms/AnalysisSpeedButtonPanel.cpp	2009-11-05 16:03:02.000000000 -0500
+++ extrema-4.4.5.dfsg-my/src/wxForms/AnalysisSpeedButtonPanel.cpp	2014-03-19 16:43:10.057725210 -0400
@@ -163,7 +163,7 @@
   wxFileDialog *fd;
   fd = new wxFileDialog( this, wxT("Save session"), wxT(""), wxT(""),
                          wxT("xml files (*.xml)|*.xml"),
-                         wxSAVE|wxOVERWRITE_PROMPT|wxCHANGE_DIR );
+                         wxFD_SAVE|wxFD_OVERWRITE_PROMPT|wxFD_CHANGE_DIR );
   wxString filename;
   if( fd->ShowModal() == wxID_OK )filename = fd->GetPath();
   if( filename.empty() )return;
@@ -195,7 +195,7 @@
   wxFileDialog *fd;
   fd = new wxFileDialog( this, wxT("Save session"), wxT(""), wxT(""),
                          wxT("xml files (*.xml)|*.xml"),
-                         wxOPEN|wxFILE_MUST_EXIST|wxCHANGE_DIR );
+                         wxFD_OPEN|wxFD_FILE_MUST_EXIST|wxFD_CHANGE_DIR );
   wxString filename;
   if( fd->ShowModal() == wxID_OK )filename = fd->GetPath();
   if( filename.empty() )return;
--- extrema-4.4.5.dfsg/src/wxForms/AxisPopup.cpp	2009-11-05 16:03:02.000000000 -0500
+++ extrema-4.4.5.dfsg-my/src/wxForms/AxisPopup.cpp	2014-03-19 16:44:24.320442460 -0400
@@ -214,9 +214,10 @@
   
   sizer->Add( new wxStaticText(panel,wxID_ANY,wxT("Font ")), wxSizerFlags(0).Left().Border(wxTOP,5) );
   int nf = GRA_fontControl::GetCount();
-  wxString choices[nf];
+  wxString *choices = new wxString[nf];
   for( int i=0; i<nf; ++i )choices[i] = GRA_fontControl::GetFont(i)->GetFontName();
   nFontCB_ = new wxComboBox( panel, ID_numbersFont, wxT(""), wxDefaultPosition, wxSize(200,25), nf, choices, wxCB_READONLY );
+  delete [] choices;
   nFontCB_->SetToolTip( wxT("choose the axis numbers font") );
   sizer->Add( nFontCB_, wxSizerFlags(0).Left().Border(wxALL,2) );
   
@@ -268,9 +269,10 @@
   
   topSizer->Add( new wxStaticText(topPanel,wxID_ANY,wxT("Font ")), wxSizerFlags(0).Left().Border(wxTOP,5) );
   int nf = GRA_fontControl::GetCount();
-  wxString choices[nf];
+  wxString *choices = new wxString[nf];
   for( int i=0; i<nf; ++i )choices[i] = GRA_fontControl::GetFont(i)->GetFontName();
   lFontCB_ = new wxComboBox( topPanel, ID_labelFont, wxT(""), wxDefaultPosition, wxSize(200,25), nf, choices, wxCB_READONLY );
+  delete [] choices;
   lFontCB_->SetToolTip( wxT("choose the axis label font") );
   topSizer->Add( lFontCB_, wxSizerFlags(0).Left().Border(wxALL,2) );
   
--- extrema-4.4.5.dfsg/src/wxForms/ChooseFilePanel.cpp	2009-11-05 16:03:02.000000000 -0500
+++ extrema-4.4.5.dfsg-my/src/wxForms/ChooseFilePanel.cpp	2014-03-19 16:47:31.359237954 -0400
@@ -96,13 +96,13 @@
   if( read_ )
   {
     fd = new wxFileDialog( this, message_, wxT(""), wxT(""), fileType_,
-                           wxOPEN|wxFILE_MUST_EXIST|wxCHANGE_DIR );
+                           wxFD_OPEN|wxFD_FILE_MUST_EXIST|wxFD_CHANGE_DIR );
     mode = std::ios_base::in;
   }
   else
   {
     fd = new wxFileDialog( this, message_, wxT(""), wxT(""), fileType_,
-                           wxSAVE|wxOVERWRITE_PROMPT|wxCHANGE_DIR );
+                           wxFD_SAVE|wxFD_OVERWRITE_PROMPT|wxFD_CHANGE_DIR );
     mode = std::ios_base::out;
   }
   wxString filename;
@@ -147,11 +147,11 @@
 
 void ChooseFilePanel::RemoveFilename()
 {
-  if( filenameComboBox_->IsEmpty() )return;
+  if( filenameComboBox_->wxChoice::IsEmpty() )return;
   int i = filenameComboBox_->GetSelection();
   filenameComboBox_->Delete( i );
   i > 0 ? filenameComboBox_->SetSelection(i-1) : filenameComboBox_->SetSelection(0);
-  if( filenameComboBox_->IsEmpty() )filenameComboBox_->SetValue( wxT("") );
+  if( filenameComboBox_->wxChoice::IsEmpty() )filenameComboBox_->SetValue( wxT("") );
 }
 
 wxString ChooseFilePanel::GetSelection()
--- extrema-4.4.5.dfsg/src/wxForms/FontChooser.cpp	2010-02-02 20:11:40.000000000 -0500
+++ extrema-4.4.5.dfsg-my/src/wxForms/FontChooser.cpp	2014-03-19 17:45:17.130225304 -0400
@@ -101,9 +101,10 @@
   topSizer->Add( new wxStaticText(topPanel,wxID_ANY,wxT("Font ")), wxSizerFlags(0).Right().Border(wxTOP,5) );
   //
   int nf = GRA_fontControl::GetCount();
-  wxString choices[nf];
+  wxString *choices = new wxString[nf];
   for( int i=0; i<nf; ++i )choices[i] = GRA_fontControl::GetFont(i)->GetFontName();
   fontCB_ = new wxComboBox( topPanel, ID_font, wxT(""), wxDefaultPosition, wxSize(200,25), nf, choices, wxCB_READONLY );
+  delete [] choices;
   topSizer->Add( fontCB_, wxSizerFlags(1).Left().Border(wxALL,2) );
   topPanel->SetSizer( topSizer );
   mainSizer->Add( topPanel, wxSizerFlags(0).Expand().Border(wxALL,2) );
--- extrema-4.4.5.dfsg/src/wxForms/LegendPopup.cpp	2009-11-05 16:03:02.000000000 -0500
+++ extrema-4.4.5.dfsg-my/src/wxForms/LegendPopup.cpp	2014-03-19 17:53:40.343095936 -0400
@@ -166,10 +166,11 @@
   titleBotSizer->Add( new wxStaticText(titleBotPanel,wxID_ANY,wxT("Font")),
                       wxSizerFlags(0).Left().Border(wxALL,2) );
   int nf = GRA_fontControl::GetCount();
-  wxString choices[nf];
+  wxString *choices = new wxString[nf];
   for( int i=0; i<nf; ++i )choices[i] = GRA_fontControl::GetFont(i)->GetFontName();
   titleFontCB_ = new wxComboBox( titleBotPanel, ID_font, wxT(""), wxDefaultPosition, wxSize(200,25), nf,
                                  choices, wxCB_READONLY );
+  delete [] choices;
   titleFontCB_->SetToolTip( wxT("choose the title font") );
   titleBotSizer->Add( titleFontCB_, wxSizerFlags(0).Left().Border(wxALL,2) );
 
--- extrema-4.4.5.dfsg/src/wxForms/TextPopup.cpp	2009-11-05 16:03:02.000000000 -0500
+++ extrema-4.4.5.dfsg-my/src/wxForms/TextPopup.cpp	2014-03-19 17:55:29.756449483 -0400
@@ -107,10 +107,11 @@
   //
   fSizer->Add( new wxStaticText(fPanel,wxID_ANY,wxT("Font")), wxSizerFlags(0).Left().Border(wxTOP,2) );
   int nf = GRA_fontControl::GetCount();
-  wxString choices[nf];
+  wxString *choices = new wxString[nf];
   for( int i=0; i<nf; ++i )choices[i] = GRA_fontControl::GetFont(i)->GetFontName();
   fontCB_ = new wxComboBox( fPanel, ID_font, wxT(""), wxDefaultPosition, wxSize(200,25), nf,
                             choices, wxCB_READONLY );
+  delete [] choices;
   fontCB_->SetToolTip( wxT("choose the text font") );
   fSizer->Add( fontCB_, wxSizerFlags(0).Left().Border(wxALL,2) );
   
--- extrema-4.4.5.dfsg/src/wxForms/VisualizationSpeedButtonPanel.cpp	2010-02-02 15:39:48.000000000 -0500
+++ extrema-4.4.5.dfsg-my/src/wxForms/VisualizationSpeedButtonPanel.cpp	2014-03-19 17:57:27.321657962 -0400
@@ -163,7 +163,7 @@
   wxString wildcard( wxT("Encapsulated PostScript (*.eps)|*.eps|PNG file (*.png)|*.png|JPEG file (*.jpeg)|*.jpeg") );
 #endif
   wxFileDialog *fd = new wxFileDialog( this, wxT("Choose an output file"), wxT(""), wxT(""),
-                                       wildcard, wxSAVE|wxOVERWRITE_PROMPT|wxCHANGE_DIR );
+                                       wildcard, wxFD_SAVE|wxFD_OVERWRITE_PROMPT|wxFD_CHANGE_DIR );
   if( fd->ShowModal() != wxID_OK )return;
   wxString filename( fd->GetFilename() );
   if( filename.empty() )return;
--- extrema-4.4.5.dfsg/src/wxForms/VisualizationWindow.cpp	2010-01-26 22:51:27.000000000 -0500
+++ extrema-4.4.5.dfsg-my/src/wxForms/VisualizationWindow.cpp	2014-03-19 17:59:10.060939337 -0400
@@ -501,7 +501,7 @@
 {
   wxString wildcard( wxT("PostScript (*.eps)|*.eps") );
   wxFileDialog *fd = new wxFileDialog( this, wxT("Choose an output file"), wxT(""), wxT(""),
-                                       wildcard, wxSAVE|wxOVERWRITE_PROMPT|wxCHANGE_DIR );
+                                       wildcard, wxFD_SAVE|wxFD_OVERWRITE_PROMPT|wxFD_CHANGE_DIR );
   if( fd->ShowModal() != wxID_OK )return;
   wxString filename( fd->GetFilename() );
   if( filename.empty() )return;
@@ -530,7 +530,7 @@
 {
   wxString wildcard( wxT("PNG (*.png)|*.png") );
   wxFileDialog *fd = new wxFileDialog( this, wxT("Choose an output file"), wxT(""), wxT(""),
-                                       wildcard, wxSAVE|wxOVERWRITE_PROMPT|wxCHANGE_DIR );
+                                       wildcard, wxFD_SAVE|wxFD_OVERWRITE_PROMPT|wxFD_CHANGE_DIR );
   if( fd->ShowModal() != wxID_OK )return;
   wxString filename( fd->GetFilename() );
   if( filename.empty() )return;
@@ -561,7 +561,7 @@
 {
   wxString wildcard( wxT("JPEG (*.jpeg)|*.jpeg") );
   wxFileDialog *fd = new wxFileDialog( this, wxT("Choose an output file"), wxT(""), wxT(""),
-                                       wildcard, wxSAVE|wxOVERWRITE_PROMPT|wxCHANGE_DIR );
+                                       wildcard, wxFD_SAVE|wxFD_OVERWRITE_PROMPT|wxFD_CHANGE_DIR );
   if( fd->ShowModal() != wxID_OK )return;
   wxString filename( fd->GetFilename() );
   if( filename.empty() )return;

Reply via email to