Skip to content

Commit

Permalink
Removed warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
kjetilly committed Nov 22, 2013
1 parent 3dbf48a commit a36585a
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 21 deletions.
10 changes: 5 additions & 5 deletions examples/fpsviewer/fpsviewer_job.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,18 @@ void DrawCube(float size) {

glBegin(GL_QUADS);

glColor3f(0.7, 0.0, 0.0);
glColor3f(0.7f, 0.0f, 0.0f);
glVertex3f(-size, -size, -size);
glVertex3f( size, -size, -size);
glVertex3f( size, size, -size);
glVertex3f(-size, size, -size);
glColor3f(0.0, 1.0, 1.0);
glColor3f(0.0f, 1.0f, 1.0f);
glVertex3f(-size, -size, size);
glVertex3f( size, -size, size);
glVertex3f( size, size, size);
glVertex3f(-size, size, size);

glColor3f(0.0, 0.0, 0.7);
glColor3f(0.0f, 0.0f, 0.7f);

glVertex3f(-size, -size, -size);
glVertex3f(-size, -size, size);
Expand All @@ -100,14 +100,14 @@ void DrawCube(float size) {
glVertex3f( size, size, size);
glVertex3f( size, size, -size);

glColor3f(0.0, 0.7, 0.0);
glColor3f(0.0f, 0.7f, 0.0f);

glVertex3f(-size, -size, -size);
glVertex3f(-size, -size, size);
glVertex3f( size, -size, size);
glVertex3f( size, -size, -size);

glColor3f( 0.25, 0.25, 0.25 );
glColor3f( 0.25f, 0.25f, 0.25f );
glVertex3f(-size, size, -size);
glVertex3f(-size, size, size);
glVertex3f( size, size, size);
Expand Down
4 changes: 2 additions & 2 deletions include/tinia/qtcontroller/impl/http_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void ParseGetHelper<0>::parse(Sequence& seq, const QMap<QString, QString>& param
try {
boost::tuples::get<0>(seq) =
boost::lexical_cast<typename boost::tuples::element<0, Sequence>::type>(parameters[keys[0]].toStdString());
} catch(boost::bad_lexical_cast& e) {
} catch(boost::bad_lexical_cast&) {
throw std::invalid_argument("Could not parse the value of key "
+ keys[0].toStdString());
}
Expand All @@ -59,7 +59,7 @@ void ParseGetHelper<i>::parse(Sequence& seq, const QMap<QString, QString>& param
try {
boost::tuples::get<i>(seq) =
boost::lexical_cast<typename boost::tuples::element<i, Sequence>::type>(parameters[keys[i]].toStdString());
} catch(boost::bad_lexical_cast& e) {
} catch(boost::bad_lexical_cast& ) {
throw std::invalid_argument("Could not parse the value of key "
+ keys[i].toStdString());
}
Expand Down
2 changes: 1 addition & 1 deletion src/jobcontroller/ComputeJob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ComputeJob::operator()()
run();
m_model->updateElement("status", "finished");
}
catch (Interrupted &e)
catch (Interrupted &)
{
m_model->updateElement("status", "terminated");
}
Expand Down
8 changes: 4 additions & 4 deletions src/modelxml/XMLReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ XMLReader::XMLReader()
depth = xmlTextReaderDepth(reader);
xmlChar *localName = xmlTextReaderLocalName(reader);
if (type==1) {
state_begin_found = xmlStrEqual(localName, BAD_CAST name.c_str());
state_begin_found = (xmlStrEqual(localName, BAD_CAST name.c_str()) != 0);
if (state_begin_found)
state_end_found = xmlTextReaderIsEmptyElement(reader);
state_end_found = (xmlTextReaderIsEmptyElement(reader) != 0);
} else
if (type==15) {
state_end_found = xmlStrEqual(localName, BAD_CAST name.c_str());
state_end_found = (xmlStrEqual(localName, BAD_CAST name.c_str()) != 0);
}
xmlFree(localName);
r=xmlTextReaderRead(reader);
Expand Down Expand Up @@ -95,7 +95,7 @@ XMLReader::XMLReader()
depth = xmlTextReaderDepth(reader);
switch ( xmlTextReaderNodeType( reader ) ) {
case 15:
state_end_found = xmlStrEqual(localName, BAD_CAST section_name.c_str());
state_end_found = (xmlStrEqual(localName, BAD_CAST section_name.c_str()) != 0);
break;
case 1:
r = xmlTextReaderRead(reader);
Expand Down
2 changes: 1 addition & 1 deletion src/qtcontroller/DoubleSpinBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ DoubleSpinBox::DoubleSpinBox(std::string key, boost::shared_ptr<model::ExposedMo
setMaximum(max);
setMinimum(min);
}
catch(boost::bad_lexical_cast& exception)
catch(boost::bad_lexical_cast&)
{
// Do nothing
}
Expand Down
2 changes: 1 addition & 1 deletion src/qtcontroller/LongPollHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void LongPollHandler::handle()
QMap<QString, QString> args = decodeGetParameters(m_request);
boost::tuple<unsigned int> params = parseGet<boost::tuple<unsigned int> >(decodeGetParameters(m_request), "revision");
revision = params.get<0>();
} catch(std::invalid_argument& e) {
} catch(std::invalid_argument&) {
// Don't have to do anything;
}

Expand Down
8 changes: 4 additions & 4 deletions tutorials/tutorial3/Tutorial3_Job.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ bool Tutorial3Job::renderFrame( const std::string &session,

/** [renderloop] */
glBegin(GL_TRIANGLES);
glColor3f(1, 0, 0);
glVertex2f(0 - s1, 0);
glVertex2f(1 + s2, 0);
glVertex2f(1 + s2, 1 + s3);
glColor3f(1.f, 0.f, 0.f);
glVertex2f(0.f - s1, 0.f);
glVertex2f(1.f + s2, 0.f);
glVertex2f(1.f + s2, 1.f + s3);
glEnd();
/** [renderloop] */

Expand Down
2 changes: 1 addition & 1 deletion unittests/modelxml/ExposedModelTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ struct AddMatrixFixture : public Fixture {
matrixName( "projection" )
{
for(int i = 0; i < 16; ++i) {
myMatrix[i] = i + 1;
myMatrix[i] = float(i + 1);
}

model->addMatrixElement( matrixName, myMatrix.data() );
Expand Down
4 changes: 2 additions & 2 deletions unittests/renderlist/Simple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ BOOST_FIXTURE_TEST_CASE( foobar, Fixture )
->set( temporaryCubeNormArray, sizeof(temporaryCubeNormArray) / sizeof(float));


float P[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1.0202, -1, 0, 0, -0.121333, 0 };
float Pi[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -8.24176, 0, 0, -1, 8.40826 };
float P[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1.0202f, -1, 0, 0, -0.121333f, 0 };
float Pi[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -8.24176f, 0, 0, -1, 8.40826f };
float cfw[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, -3, 1};
float ctw[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 3, 1 };
float lfw[16] = {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};
Expand Down

0 comments on commit a36585a

Please sign in to comment.