eliminate -Wextra and -pedantic warnings

This commit is contained in:
Jinhao
2016-03-15 15:46:28 +08:00
parent 8f995ee2cf
commit 6b6b527007
38 changed files with 246 additions and 197 deletions

View File

@@ -867,7 +867,7 @@ namespace paint
::DeleteObject(hBmp);
::DeleteDC(hdcMem);
#elif defined(NANA_X11)
static_cast<void>(file_utf8); //eliminate unused parameter compil warning.
#endif
}
}
@@ -1201,6 +1201,10 @@ namespace paint
if(solid)
rectangle(::nana::rectangle(r).pare_off(1), true, solid_clr);
}
//eliminate unused parameter compiler warning.
static_cast<void>(radius_x);
static_cast<void>(radius_y);
#endif
}
}

View File

@@ -73,7 +73,8 @@ namespace paint
return true;
}
#else
if(is_ico_){} //kill the unused compiler warning in Linux.
static_cast<void>(is_ico_); //eliminate the unused compiler warning in Linux.
static_cast<void>(file); //to eliminate the unused parameter compiler warning.
#endif
return false;
}
@@ -98,7 +99,9 @@ namespace paint
}
}
#else
if(is_ico_){} //kill the unused compiler warning in Linux.
static_cast<void>(is_ico_); //kill the unused compiler warning in Linux.
static_cast<void>(data); //to eliminate unused parameter compiler warning.
static_cast<void>(bytes);
#endif
return false;
}
@@ -129,6 +132,9 @@ namespace paint
{
#if defined(NANA_WINDOWS)
::DrawIconEx(graph.handle()->context, p_dst.x, p_dst.y, *ptr_, src_r.width, src_r.height, 0, 0, DI_NORMAL);
#else
static_cast<void>(src_r); //eliminate unused parameter compiler warning.
static_cast<void>(p_dst);
#endif
}
}
@@ -139,6 +145,8 @@ namespace paint
{
#if defined(NANA_WINDOWS)
::DrawIconEx(graph.handle()->context, r.x, r.y, *ptr_, r.width, r.height, 0, 0, DI_NORMAL);
#else
static_cast<void>(r); //eliminate unused parameter compiler warning.
#endif
}
}

View File

@@ -977,7 +977,7 @@ namespace nana{ namespace paint
}
}
void pixel_buffer::gradual_rectangle(const ::nana::rectangle& draw_rct, const ::nana::color& from, const ::nana::color& to, double fade_rate, bool vertical)
void pixel_buffer::gradual_rectangle(const ::nana::rectangle& draw_rct, const ::nana::color& from, const ::nana::color& to, double /*fade_rate*/, bool vertical)
{
auto sp = storage_.get();
if (nullptr == sp) return;