Merge pull request #430 from mapbox/fix-build-warnings

Fix build warnings
This commit is contained in:
Konstantin Käfer
2014-08-18 15:43:06 +02:00
8 changed files with 7 additions and 10 deletions

View File

@@ -153,7 +153,7 @@ HeadlessView::~HeadlessView() {
#endif
}
void HeadlessView::notify_map_change(mbgl::MapChange change, mbgl::timestamp delay) {
void HeadlessView::notify_map_change(mbgl::MapChange /*change*/, mbgl::timestamp /*delay*/) {
// no-op
}

View File

@@ -5,6 +5,7 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wdeprecated-register"
#ifndef __clang__
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"

View File

@@ -532,13 +532,8 @@ void Map::prepare() {
transform.updateTransitions(animationTime);
}
const TransformState oldState = state;
state = transform.currentState();
bool pixelRatioChanged = oldState.getPixelRatio() != state.getPixelRatio();
bool dimensionsChanged = oldState.getFramebufferWidth() != state.getFramebufferWidth() ||
oldState.getFramebufferHeight() != state.getFramebufferHeight();
animationTime = util::now();
updateSources();
style->updateProperties(state.getNormalizedZoom(), animationTime);

View File

@@ -465,6 +465,7 @@ std::unique_ptr<StyleLayerGroup> StyleParser::createLayers(JSVal value) {
return group;
} else {
Log::Warning(Event::ParseStyle, "layers must be an array");
return nullptr;
}
}

View File

@@ -132,7 +132,7 @@ void FontStack::lineWrap(Shaping &shaping, const float lineHeight, const float m
maxLineLength = maxLineLength || shaping.back().x;
justifyLine(shaping, metrics, lineStartIndex, shaping.size() - 1, justify);
justifyLine(shaping, metrics, lineStartIndex, uint32_t(shaping.size()) - 1, justify);
align(shaping, justify, horizontalAlign, verticalAlign, maxLineLength, lineHeight, line);
}

View File

@@ -17,7 +17,7 @@ const std::string &FileSource::getBase() const {
return base;
}
void FileSource::load(ResourceType type, const std::string &url, std::function<void(platform::Response *)> callback, const std::shared_ptr<uv::loop> loop) {
void FileSource::load(ResourceType /*type*/, const std::string &url, std::function<void(platform::Response *)> callback, const std::shared_ptr<uv::loop> loop) {
// convert relative URLs to absolute URLs
const std::string absoluteURL = [&]() -> std::string {

View File

@@ -75,7 +75,7 @@ TEST_P(StyleParserTest, ParseStyle) {
std::cerr << "Unchecked Log Messages (" << base << "/" << name << "): " << std::endl << unchecked;
}
ASSERT_EQ(0, unchecked.size());
ASSERT_EQ(0ul, unchecked.size());
}
}