Changeset 2163 for trunk


Ignore:
Timestamp:
05/10/11 15:02:56 (14 years ago)
Author:
Malte Marquarding
Message:

Remove various compiler warnings

Location:
trunk/src
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/LineCatalog.cpp

    r1534 r2163  
    9999    }
    100100  } else {
    101       if ( row < table_.nrow() ) {
     101    if ( row < int(table_.nrow()) ) {
    102102        oss << std::right << setw(7) << row << setw(2) << "";
    103103        oss << std::left << setw(20) << getName(row);
  • trunk/src/MathUtils.cpp

    r2127 r2163  
    133133                       const Vector<Float>& in, const Vector<Bool>& mask,
    134134                       Bool relaxed, Bool ignoreOther) {
     135  (void) ignoreOther; //suppress unused warning
    135136  Vector< Vector<Float> > weights(8);
    136137  Vector<Float> vals(3);
     
    181182                             float width)
    182183{
    183   Int hwidth = Int(width+0.5);
    184   Int fwidth = hwidth*2+1;
     184  uInt hwidth = Int(width+0.5);
     185  uInt fwidth = hwidth*2+1;
    185186  out.resize(in.nelements());
    186187  outflag.resize(flag.nelements());
     
    189190  Float medval = ms.add(const_cast<Vector<Float>& >(in)(sl),
    190191                  const_cast<Vector<Bool>& >(flag)(sl));
     192  (void) medval;//suppress unused warning
    191193  uInt n = in.nelements();
    192194  for (uInt i=hwidth; i<(n-hwidth); ++i) {
     
    208210                       float width, int order)
    209211{
    210   Int hwidth = Int(width+0.5);
    211   Int fwidth = hwidth*2+1;
     212  uInt hwidth = Int(width+0.5);
     213  uInt fwidth = hwidth*2+1;
    212214  out.resize(in.nelements());
    213215  outmask.resize(mask.nelements());
  • trunk/src/PKSFiller.cpp

    r1916 r2163  
    257257    fseek( fp, 640, SEEK_SET ) ;
    258258    char buf[81] ;
    259     fread( buf, 80, 1, fp ) ;
     259    size_t tmp = fread( buf, 80, 1, fp ) ;
     260    (void) tmp;
    260261    buf[80] = '\0' ;
    261262    if ( strstr( buf, "NRAO_GBT" ) != NULL ) {
  • trunk/src/PKSFiller.h

    r1904 r2163  
    2424#include "Scantable.h"
    2525
    26 class casa::Record;
    2726class PKSreader;
    2827
  • trunk/src/STAsciiWriter.cpp

    r1819 r2163  
    138138    //        stable.molecules().getRestFrequency(rec.asuInt("MOLECULE_ID") ));
    139139    addLine(of, "Rest Freq.", restfreqs[0]);
    140     for ( unsigned int i=1; i<nf; ++i) {
     140    for ( int i=1; i<nf; ++i) {
    141141      addLine(of, " ", restfreqs[i]);
    142142    }
  • trunk/src/STAttr.cpp

    r1618 r2163  
    5252}
    5353
    54 STAttr::STAttr(const STAttr& other)
    55 {
     54STAttr::STAttr(const STAttr& other):
     55  Logger()
     56{
     57  (void) other; //suppress unused warning
    5658   initData();                     // state just private 'static' data
    5759}
  • trunk/src/STFiller.cpp

    r1841 r2163  
    307307**/
    308308
     309#ifdef HAS_ALMA
    309310  Double min = 0.0;
    310311  Double max = nInDataRow;
    311 #ifdef HAS_ALMA
    312312  ProgressMeter fillpm(min, max, "Data importing progress");
    313313#endif
     
    320320    fseek( fp, 640, SEEK_SET ) ;
    321321    char buf[81] ;
    322     fread( buf, 80, 1, fp ) ;
     322    size_t tmpret = fread( buf, 80, 1, fp ) ;
     323    (void) tmpret;
    323324    buf[80] = '\0' ;
    324325    if ( strstr( buf, "NRAO_GBT" ) != NULL ) {
     
    883884  char buf[9] ;
    884885  char buf2[80] ;
    885   fread( buf, 4, 1, fp ) ;
     886  size_t tmpret;
     887  tmpret = fread( buf, 4, 1, fp ) ;
    886888  buf[4] = '\0' ;
    887889  fseek( fp, 640, SEEK_SET ) ;
    888   fread( buf2, 80, 1, fp ) ;
     890  tmpret = fread( buf2, 80, 1, fp ) ;
     891  (void) tmpret; //suppress unused warning
    889892  if ( ( strncmp( buf, "RW", 2 ) == 0 ) || ( strstr( buf2, "NRO45M" ) != NULL ) ) {
    890893    bval = true ;
  • trunk/src/STFitter.cpp

    r2047 r2163  
    101101    }
    102102  }
    103   for (uInt j=m_.nelements()-1; j>=0;--j) {
     103  // use Int to suppress compiler warning
     104  for (Int j=m_.nelements()-1; j>=0;--j) {
    104105    if (m_[j]) {
    105106      mx = j;
  • trunk/src/STLineFinder.cpp

    r2081 r2163  
    9494   const casa::Float& getLinMean() const throw(AipsError);
    9595   const casa::Float& getLinVariance() const throw(AipsError);
    96    const casa::Float aboveMean() const throw(AipsError);
     96   casa::Float aboveMean() const throw(AipsError);
    9797   int getChannel() const throw();
    9898
     
    505505}
    506506
    507 const casa::Float RunningBox::aboveMean() const throw(AipsError)
     507casa::Float RunningBox::aboveMean() const throw(AipsError)
    508508{
    509509  DebugAssert(cur_channel<edge.second, AipsError);
  • trunk/src/STMath.cpp

    r2143 r2163  
    318318
    319319CountedPtr< Scantable >
    320   STMath::averageChannel( const CountedPtr < Scantable > & in,
     320STMath::averageChannel( const CountedPtr < Scantable > & in,
    321321                          const std::string & mode,
    322322                          const std::string& avmode )
    323323{
     324  (void) mode; // currently unused
    324325  // check if OTF observation
    325326  String obstype = in->getHeader().obstype ;
     
    836837  /// modes should be "nearest", "pair"
    837838  // make this operation non insitu
     839  (void) mode; //currently unused
    838840  const Table& tin = in->table();
    839841  Table ons = tin(tin.col("SRCTYPE") == Int(SrcType::PSON));
     
    14051407
    14061408
     1409  (void) scans; //currently unused
    14071410  STSelector sel;
    14081411  CountedPtr< Scantable > ws = getScantable(s, false);
     
    27142717                             mask, timeCol(i), !first,
    27152718                             interp, False);
     2719          (void) ok; // unused stop compiler nagging     
    27162720          // back into scantable
    27172721          flagOut.resize(maskOut.nelements());
     
    42594263CountedPtr<Scantable> STMath::almacalfs( const CountedPtr<Scantable>& s )
    42604264{
     4265  (void) s; //currently unused
    42614266  CountedPtr<Scantable> out ;
    42624267
     
    47114716                                            string antname )
    47124717{
     4718  (void) cold; //currently unused
    47134719  string reftime = on->getTime( index ) ;
    47144720  vector<int> ii( 1, on->getIF( index ) ) ;
     
    48054811                                              int index )
    48064812{
     4813  (void) cold; //currently unused
    48074814  string reftime = sig->getTime( index ) ;
    48084815  vector<int> ii( 1, sig->getIF( index ) ) ;
     
    48434850                                              int index )
    48444851{
     4852  (void) cold; //currently unused
    48454853  string reftime = sig->getTime( index ) ;
    48464854  vector<int> ii( 1, sig->getIF( index ) ) ;
  • trunk/src/STPol.h

    r1586 r2163  
    6666  virtual casa::Vector<casa::Float> getLinear( casa::uInt index ) = 0;
    6767
    68   virtual void rotatePhase( casa::Float phase ) {}
    69   virtual void rotateLinPolPhase( casa::Float phase ) {}
     68  virtual void rotatePhase( casa::Float ) {}
     69  virtual void rotateLinPolPhase( casa::Float) {}
    7070
    71   virtual void invertPhase( casa::Float phase ) {}
     71  virtual void invertPhase( casa::Float ) {}
    7272
    7373  casa::uInt nspec() const { return basespectra_.ncolumn(); }
  • trunk/src/STPolLinear.cpp

    r1189 r2163  
    3030Vector<Float> asap::STPolLinear::getStokes( uint index )
    3131{
    32   if ( index < 0 || index >4 ) throw(AipsError("Stokes index out of range"));
     32  if ( index > 4 ) throw(AipsError("Stokes index out of range"));
    3333  Vector<Float> out;
    3434  Float phase = getTotalPhase();
     
    6161    throw(AipsError("You must have 4 linear polarizations to run this function"));
    6262  }
    63   if ( index < 0 || index >4 ) throw(AipsError("LinPol index out of range"));
     63  if ( index >4 ) throw(AipsError("LinPol index out of range"));
    6464  Vector<Float> out,q,u;
    6565  if ( nspec() == 4) {
     
    129129{
    130130  // phase isnt used, just ro keep interface the same for all pol operations
     131  (void) phase;
    131132  if (nspec() != 4) {
    132133    throw(AipsError("You must have 4 linear polarizations to run this function"));
  • trunk/src/STWriter.h

    r1819 r2163  
    4242
    4343class PKSwriter;
    44 class casa::Table;
    4544
    4645namespace asap {
  • trunk/src/Scantable.cpp

    r2162 r2163  
    137137         << "Data will be loaded from " << outname << " instead of "
    138138         << name << LogIO::POST ;
    139       system( exec.c_str() ) ;
     139      int tmp = system( exec.c_str() ) ;
     140      (void) tmp;
    140141      tab = Table(outname, Table::Update ) ;
    141142      //os << "tab.tableName()=" << tab.tableName() << LogIO::POST ;
     
    178179*/
    179180
    180 Scantable::Scantable( const Scantable& other, bool clear )
     181Scantable::Scantable( const Scantable& other, bool clear ):
     182  Logger()
    181183{
    182184  // with or without data
     
    986988
    987989
    988 std::string Scantable::headerSummary( bool verbose )
     990std::string Scantable::headerSummary()
    989991{
    990992  // Format header info
     
    10351037  oss << setw(15) << "Abcissa:" << getAbcissaLabel(0) << endl;
    10361038  oss << selector_.print() << endl;
    1037   /// @todo implement verbose mode
    10381039  return String(oss);
    10391040}
    10401041
    1041 std::string Scantable::summary( bool verbose )
     1042std::string Scantable::summary()
    10421043{
    10431044  ostringstream oss;
     
    10481049
    10491050  // Format header info
    1050   oss << headerSummary(verbose);
     1051  oss << headerSummary();
    10511052  oss << endl;
    10521053
     
    11121113    ++iter;
    11131114  }
    1114   /// @todo implement verbose mode
    11151115  return String(oss);
    11161116}
     
    12821282void Scantable::setRestFrequencies( const vector<std::string>& name )
    12831283{
     1284  (void) name; // suppress unused warning
    12841285  throw(AipsError("setRestFrequencies( const vector<std::string>& name ) NYI"));
    12851286  ///@todo implement
     
    26842685
    26852686
    2686 std::string Scantable::formatBaselineParamsHeader(int whichrow, const std::string& masklist, bool verbose) const
     2687std::string Scantable::formatBaselineParamsHeader(int whichrow,
     2688                                                  const std::string& masklist,
     2689                                                  bool verbose) const
    26872690{
    26882691  ostringstream oss;
     
    27192722}
    27202723
    2721   std::string Scantable::formatBaselineParams(const std::vector<float>& params, const std::vector<bool>& fixed, float rms, const std::string& masklist, int whichrow, bool verbose, int start, int count, bool resetparamid) const
     2724  std::string Scantable::formatBaselineParams(const std::vector<float>& params,
     2725                                              const std::vector<bool>& fixed,
     2726                                              float rms,
     2727                                              const std::string& masklist,
     2728                                              int whichrow,
     2729                                              bool verbose,
     2730                                              int start, int count,
     2731                                              bool resetparamid) const
    27222732{
    27232733  int nParam = (int)(params.size());
  • trunk/src/Scantable.h

    r2161 r2163  
    372372    { historyTable_.append(otherhist); }
    373373
    374   std::string headerSummary(bool verbose=false);
    375   std::string summary(bool verbose=false);
     374  std::string headerSummary();
     375  std::string summary();
    376376  //std::string getTime(int whichrow=-1, bool showdate=true) const;
    377377  std::string getTime(int whichrow=-1, bool showdate=true, casa::uInt prec=0) const;
  • trunk/src/ScantableWrapper.h

    r2161 r2163  
    218218
    219219  std::string summary(bool verbose=false) const {
    220     return table_->summary(verbose);
     220    return table_->summary();
    221221  }
    222222
    223223  std::string listHeader(bool verbose=false) const {
    224     return table_->headerSummary(verbose);
    225   }
    226 
    227   std::vector<std::string> getHistory()const
     224    return table_->headerSummary();
     225  }
     226
     227  std::vector<std::string> getHistory() const
    228228    { return table_->getHistory(); }
    229229
  • trunk/src/python_asap.h

    r1974 r2163  
    3232#define PYTHON_ASAP_H
    3333
    34 class casa::AipsError;
    35 
    3634namespace asap {
    3735  namespace python {
Note: See TracChangeset for help on using the changeset viewer.