fix more warnings
authorDiane Trout <diane@caltech.edu>
Tue, 28 Mar 2006 06:36:06 +0000 (06:36 +0000)
committerDiane Trout <diane@caltech.edu>
Tue, 28 Mar 2006 06:36:06 +0000 (06:36 +0000)
ticket:34 inspired me to go fix more warnings.

alg/color.cpp
alg/glsequence.cpp
alg/nway_paths.cpp
alg/nway_paths.hpp
qui/MussaAlignedWindow.cpp
qui/ThresholdWidget.cpp
qui/mussa_setup_dialog/SequenceSetupFrame.cpp

index 1c01f892941f51eb05d1065c4795b7d1ce5a4367..cbcc59e70a638891ab34be18debf7f57dc518c05 100644 (file)
@@ -94,4 +94,5 @@ std::ostream &operator<<(std::ostream &out, const Color &c)
                     << c.g() << ", " 
                     << c.b() << ", " 
                     << c.a() << ")";
+  return out;
 }
index fecb29f75c89d7978ba36445cafbe938a6b9ea95..e38da9d417e40999d0e20df04996c61cc7456094 100644 (file)
@@ -199,14 +199,14 @@ void GlSequence::draw_box(GLfloat left, GLfloat right,
   glEnd();
 }
 
-void GlSequence::draw_track(GLfloat left, GLfloat right) const
+void GlSequence::draw_track(GLfloat , GLfloat ) const
 {
   glColor3fv(drawColor.get());
   // draw main sequence track
   draw_box(seq_x, seq_x+seq.size(), seq_height, 0.0);
 }
 
-void GlSequence::draw_annotations(GLfloat left, GLfloat right) const
+void GlSequence::draw_annotations(GLfloat , GLfloat ) const
 {
   // draw annotations
   GLfloat annotation_z = seq_z + 1.0;
index 33c195b5e6aa3288164126cbdd8541dd4eb61876..a71bda67e274ac53de6c3e12e01cf2728d7c4ed9 100644 (file)
@@ -264,11 +264,10 @@ NwayPaths::load(string load_file_path)
 
 
 void
-NwayPaths::path_search(vector<vector<FLPs> > all_comparisons, ConservedPath path, int depth)
+NwayPaths::path_search(vector<vector<FLPs> > all_comparisons, ConservedPath path, size_t depth)
 {
   list<int> new_nodes, trans_check_nodes;
   list<int>::iterator new_nodes_i, new_nodes_end;
-  int i;
   bool trans_check_good;
 
   new_nodes = all_comparisons[depth - 1][depth].match_locations(path[depth-1]);
@@ -279,7 +278,7 @@ NwayPaths::path_search(vector<vector<FLPs> > all_comparisons, ConservedPath path
     //cout << "    * species " << depth << " node: " << *new_nodes_i << endl;
     // check transitivity with previous nodes in path
     trans_check_good = true;
-    for(i = 0; i < depth - 1; i++)
+    for(size_t i = 0; i < depth - 1; i++)
     {
       trans_check_nodes = all_comparisons[i][depth].match_locations(path[i]);
       if ( (trans_check_nodes.end() == find(trans_check_nodes.begin(),
@@ -351,7 +350,7 @@ NwayPaths::save_old(string save_file_path)
 {
   fstream save_file;
   list<ConservedPath >::iterator path_i, paths_end;
-  int i;
+  size_t i;
 
   save_file.open(save_file_path.c_str(), ios::app);
 
index f8337e22b5cd46ad0b31d00a3dfc100df4841fef..ccf7ea008a91ac8f036c12615f2e3f2409a5c6f8 100644 (file)
@@ -52,7 +52,7 @@ class NwayPaths
 
   // old recursive transitive nway ... has issues checking all links?
     void find_paths_r(std::vector<std::vector<FLPs> > all_comparisons);
-    void path_search(std::vector<std::vector<FLPs> > all_comparisons, ConservedPath path, int depth);
+    void path_search(std::vector<std::vector<FLPs> > all_comparisons, ConservedPath path, size_t depth);
 
     void simple_refine();
     void save(std::string save_file_path);
index fbf2d6a53e1af0972d84bceb90cb02e63baf892a..4b7b5929d65bc9684dcb8cc93da25c2bb1f0683c 100644 (file)
@@ -129,12 +129,11 @@ void MussaAlignedWindow::computeMatchLines()
 {
   const vector<Sequence>& raw_sequence = analysis.sequences();
   vector<int> aligned_path;
-  int i2, i3;
+  size_t i2, i3;
   int x_start, x_end;
   int window_length, win_i;
   int rc_1 = 0; 
   int rc_2 = 0;
-  bool rc_color;
   vector<bool> rc_list;
   bool full_match;
   vector<bool> matched;
index 2779a208251dba075ba598875b11e23bcf6da505..62cc1e1880fd9e003dc5238e205bc6307f613445 100644 (file)
@@ -78,7 +78,7 @@ void ThresholdWidget::setPercentThreshold(int percent_threshold)
   if (cur_percent_threshold != percent_threshold)
   {
     cur_percent_threshold = percent_threshold;
-    long t=roundl(basepair_spinner.maximum()*((float)percent_threshold/100.0));
+    long t=lround(basepair_spinner.maximum()*((float)percent_threshold/100.0));
     cur_bp_threshold = (int)t;
     percent_spinner.setValue(percent_threshold);
     basepair_spinner.setValue(cur_bp_threshold);
index 10059a8461412bcba3f43ef05c58767885b6377c..fd26f26f19028ba7ba89e9732bdaa114eb583493 100644 (file)
@@ -9,11 +9,9 @@
 
 SequenceSetupFrame::SequenceSetupFrame(QWidget *parent)
   : QWidget(parent),
-    sequenceLayout(0),
-    seqCount(0)//,
-    //seqList(0)
+    seqCount(0),
+    sequenceLayout(0)
 {
-
   // frame
   sequenceFrame = new QFrame;
   sequenceFrame->setFrameStyle(QFrame::Panel | QFrame::Sunken);