From: Wolfgang Bangerth Date: Thu, 2 Aug 2007 22:03:24 +0000 (+0000) Subject: Make body-less loops more obvious to read, and thereby also suppress a warning that... X-Git-Tag: v8.0.0~10156 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cb418a400e5dce4d6320315529fb5de300dae1e;p=dealii.git Make body-less loops more obvious to read, and thereby also suppress a warning that gcc mainline currently gives. git-svn-id: https://svn.dealii.org/trunk@14887 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/grid/grid_in.cc b/deal.II/deal.II/source/grid/grid_in.cc index 4ad36aa2db..cfd26afc27 100644 --- a/deal.II/deal.II/source/grid/grid_in.cc +++ b/deal.II/deal.II/source/grid/grid_in.cc @@ -251,7 +251,8 @@ void GridIn::read_dbmesh (std::istream &in) // knowledge to parse and interpret // the other fields in between as // well... - while (getline(in,line), line.find("# END")==std::string::npos); + while (getline(in,line), line.find("# END")==std::string::npos) + ; skip_empty_lines (in); @@ -356,7 +357,8 @@ void GridIn::read_dbmesh (std::istream &in) // clue what they mean. skip them // all and leave the interpretation // to other implementors... - while (getline(in,line), ((line.find("End")==std::string::npos) && (in))); + while (getline(in,line), ((line.find("End")==std::string::npos) && (in))) + ; // ok, so we are not at the end of // the file, that's it, mostly @@ -1719,7 +1721,9 @@ void GridIn::skip_comment_lines (std::istream &in, while ((c=in.get()) == comment_start) // loop over the characters after // the comment starter - while (in.get() != '\n'); + while (in.get() != '\n') + ; + // put back first character of // first non-comment line diff --git a/deal.II/deal.II/source/numerics/error_estimator.cc b/deal.II/deal.II/source/numerics/error_estimator.cc index 627fb9f192..2944383e8f 100644 --- a/deal.II/deal.II/source/numerics/error_estimator.cc +++ b/deal.II/deal.II/source/numerics/error_estimator.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -61,7 +61,8 @@ void advance_by_n (CellIterator &cell, // dereferencing cell-> triggers an // assertion) const CellIterator endc = cell->get_dof_handler().end(); - for (unsigned int t=0; ((t &mapping, // `hard' cells to the different // threads. for (unsigned int t=0; (t