From 474aa8515dd5b5f448b2de2cd3f0c98d83fe15c3 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 4 Jan 2016 18:28:12 +0500 Subject: [PATCH] Libmv: Solve some strict compiler warnings --- intern/libmv/ChangeLog | 18 ++++++------------ intern/libmv/intern/frame_accessor.cc | 4 ++-- intern/libmv/intern/track_region.cc | 2 +- intern/libmv/libmv/base/aligned_malloc.cc | 2 +- intern/libmv/libmv/multiview/fundamental.h | 7 ------- intern/libmv/libmv/numeric/numeric.h | 4 ++-- 6 files changed, 12 insertions(+), 25 deletions(-) diff --git a/intern/libmv/ChangeLog b/intern/libmv/ChangeLog index 63c9963a22f..45be9c25afa 100644 --- a/intern/libmv/ChangeLog +++ b/intern/libmv/ChangeLog @@ -1,3 +1,9 @@ +commit 7a676106720fb126a27ff010abdd8bb65d7e0d9a +Author: Sergey Sharybin +Date: Mon Jan 4 18:30:12 2016 +0500 + + Fix strict compiler warnings + commit d3537e3709fe11f42312e82cb1c9837c9e742385 Author: Sergey Sharybin Date: Sun Jan 3 14:17:10 2016 +0500 @@ -595,15 +601,3 @@ Date: Mon Apr 21 14:10:43 2014 +0600 The assert didn't make any sense because ComputeBoundingBox() is intended to return bounding box in the following way: (xmin, xmax, ymin, ymax). - -commit 1d386b6775a71c499e9b8e4a288c0785c4937677 -Author: Sergey Sharybin -Date: Thu Apr 17 18:42:43 2014 +0600 - - Add unit tests for buffer (un)distortion - - Currently only uses identity camera intrinsics just to - see whether lookup grids are properly allocated. - - Should prevent accidents like that one happened recently - with crashing Blender after Libmv re-integration. diff --git a/intern/libmv/intern/frame_accessor.cc b/intern/libmv/intern/frame_accessor.cc index 8bf2cab914b..9213cc311b3 100644 --- a/intern/libmv/intern/frame_accessor.cc +++ b/intern/libmv/intern/frame_accessor.cc @@ -106,7 +106,7 @@ struct LibmvFrameAccessor : public FrameAccessor { release_image_callback_(cache_key); } - bool GetClipDimensions(int clip, int *width, int *height) { + bool GetClipDimensions(int /*clip*/, int * /*width*/, int * /*height*/) { return false; } @@ -114,7 +114,7 @@ struct LibmvFrameAccessor : public FrameAccessor { return 1; } - int NumFrames(int clip) { + int NumFrames(int /*clip*/) { return 0; } diff --git a/intern/libmv/intern/track_region.cc b/intern/libmv/intern/track_region.cc index 24fbc78c1a1..8989897e09f 100644 --- a/intern/libmv/intern/track_region.cc +++ b/intern/libmv/intern/track_region.cc @@ -95,7 +95,7 @@ int libmv_trackRegion(const libmv_TrackRegionOptions* options, int image2_height, const double* x1, const double* y1, - libmv_TrackRegionResult* result, + libmv_TrackRegionResult* /*result*/, double* x2, double* y2) { double xx1[5], yy1[5]; diff --git a/intern/libmv/libmv/base/aligned_malloc.cc b/intern/libmv/libmv/base/aligned_malloc.cc index 9141186f196..cc0a5fbbba7 100644 --- a/intern/libmv/libmv/base/aligned_malloc.cc +++ b/intern/libmv/libmv/base/aligned_malloc.cc @@ -44,7 +44,7 @@ namespace libmv { void *aligned_malloc(int size, int alignment) { #ifdef _WIN32 return _aligned_malloc(size, alignment); -#elif __APPLE__ +#elif defined(__APPLE__) // On Mac OS X, both the heap and the stack are guaranteed 16-byte aligned so // they work natively with SSE types with no further work. CHECK_EQ(alignment, 16); diff --git a/intern/libmv/libmv/multiview/fundamental.h b/intern/libmv/libmv/multiview/fundamental.h index 51067aefc2b..a6c7a6802fe 100644 --- a/intern/libmv/libmv/multiview/fundamental.h +++ b/intern/libmv/libmv/multiview/fundamental.h @@ -30,13 +30,6 @@ namespace libmv { void ProjectionsFromFundamental(const Mat3 &F, Mat34 *P1, Mat34 *P2); void FundamentalFromProjections(const Mat34 &P1, const Mat34 &P2, Mat3 *F); -/** - * The normalized 8-point fundamental matrix solver. - */ -double NormalizedEightPointSolver(const Mat &x1, - const Mat &x2, - Mat3 *F); - /** * 7 points (minimal case, points coordinates must be normalized before): */ diff --git a/intern/libmv/libmv/numeric/numeric.h b/intern/libmv/libmv/numeric/numeric.h index 55d4c7d4651..20a4a29e5ba 100644 --- a/intern/libmv/libmv/numeric/numeric.h +++ b/intern/libmv/libmv/numeric/numeric.h @@ -1,4 +1,4 @@ -// Copyright (c) 2007, 2008 libmv authors. +// Copyright (c) 2007, 2008_WIN32 libmv authors. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to @@ -289,7 +289,7 @@ void MeanAndVarianceAlongRows(const Mat &A, Vec *mean_pointer, Vec *variance_pointer); -#if _WIN32 +#if defined(_WIN32) // TODO(bomboze): un-#if this for both platforms once tested under Windows /* This solution was extensively discussed here http://forum.kde.org/viewtopic.php?f=74&t=61940 */