From b214d6ba5d4a70611ed9583aa2b8b669b3f90f3c Mon Sep 17 00:00:00 2001 From: Tadas Baltrusaitis Date: Thu, 28 Jun 2018 07:27:48 +0200 Subject: [PATCH] Trying again to remove compiler warnings. --- cmake/modules/FindTBB.cmake | 2 +- lib/local/LandmarkDetector/src/CCNF_patch_expert.cpp | 2 +- lib/local/LandmarkDetector/src/CEN_patch_expert.cpp | 4 ++-- lib/local/LandmarkDetector/src/CNN_utils.cpp | 2 +- lib/local/LandmarkDetector/src/LandmarkDetectorModel.cpp | 2 +- lib/local/LandmarkDetector/src/PDM.cpp | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmake/modules/FindTBB.cmake b/cmake/modules/FindTBB.cmake index b6836a15..5ab8e584 100644 --- a/cmake/modules/FindTBB.cmake +++ b/cmake/modules/FindTBB.cmake @@ -149,7 +149,7 @@ if(NOT TBB_FOUND) # OS X set(TBB_DEFAULT_SEARCH_DIR "/opt/intel/tbb" - "/usr/local/Cellar/tbb/" + "/usr/local/Cellar/tbb" "/usr/local/Cellar/tbb/2018_U5") # TODO: Check to see which C++ library is being used by the compiler. diff --git a/lib/local/LandmarkDetector/src/CCNF_patch_expert.cpp b/lib/local/LandmarkDetector/src/CCNF_patch_expert.cpp index 4e525a6b..bff3aa73 100644 --- a/lib/local/LandmarkDetector/src/CCNF_patch_expert.cpp +++ b/lib/local/LandmarkDetector/src/CCNF_patch_expert.cpp @@ -450,7 +450,7 @@ void CCNF_patch_expert::ResponseOpenBlas(const cv::Mat_ &area_of_interest // Perform matrix multiplication in OpenBLAS (fortran call) float alpha1 = 1.0; float beta1 = 0.0; - char* N = "N"; + char N[2]; N[0] = 'N'; sgemm_(N, N, &normalized_input.cols, &weight_matrix.rows, &weight_matrix.cols, &alpha1, (float*)normalized_input.data, &normalized_input.cols, (float*)weight_matrix.data, &weight_matrix.cols, &beta1, (float*)neuron_resp_full.data, &normalized_input.cols); // Above is a faster version of this diff --git a/lib/local/LandmarkDetector/src/CEN_patch_expert.cpp b/lib/local/LandmarkDetector/src/CEN_patch_expert.cpp index cbe07f1d..1016984e 100644 --- a/lib/local/LandmarkDetector/src/CEN_patch_expert.cpp +++ b/lib/local/LandmarkDetector/src/CEN_patch_expert.cpp @@ -217,7 +217,7 @@ void CEN_patch_expert::Response(const cv::Mat_ &area_of_interest, cv::Mat // Perform matrix multiplication in OpenBLAS (fortran call) float alpha1 = 1.0; float beta1 = 0.0; - char* N = "N"; + char N[2]; N[0] = 'N'; sgemm_(N, N, &resp.cols, &weight.rows, &weight.cols, &alpha1, m1, &resp.cols, m2, &weight.cols, &beta1, m3, &resp.cols); // The above is a faster version of this, by calling the fortran version directly @@ -490,7 +490,7 @@ void CEN_patch_expert::ResponseInternal(cv::Mat_& response) // Perform matrix multiplication in OpenBLAS (fortran call) float alpha1 = 1.0; float beta1 = 0.0; - char* N = "N"; + char N[2]; N[0] = 'N'; sgemm_(N, N, &resp.cols, &weights[layer].rows, &weights[layer].cols, &alpha1, m1, &resp.cols, m2, &weights[layer].cols, &beta1, m3, &resp.cols); // The above is a faster version of this, by calling the fortran version directly diff --git a/lib/local/LandmarkDetector/src/CNN_utils.cpp b/lib/local/LandmarkDetector/src/CNN_utils.cpp index 29cad081..576d5910 100644 --- a/lib/local/LandmarkDetector/src/CNN_utils.cpp +++ b/lib/local/LandmarkDetector/src/CNN_utils.cpp @@ -522,7 +522,7 @@ namespace LandmarkDetector float alpha = 1.0f; float beta = 0.0f; // Call fortran directly (faster) - char* N = "N"; + char N[2]; N[0] = 'N'; sgemm_(N, N, &m2_cols, &num_rows, &pre_alloc_im2col.cols, &alpha, m2, &m2_cols, m1, &pre_alloc_im2col.cols, &beta, m3, &m2_cols); // Above is equivalent to out = pre_alloc_im2col * weight_matrix; diff --git a/lib/local/LandmarkDetector/src/LandmarkDetectorModel.cpp b/lib/local/LandmarkDetector/src/LandmarkDetectorModel.cpp index 2d5fada8..9861af99 100644 --- a/lib/local/LandmarkDetector/src/LandmarkDetectorModel.cpp +++ b/lib/local/LandmarkDetector/src/LandmarkDetectorModel.cpp @@ -1120,7 +1120,7 @@ float CLNF::NU_RLMS(cv::Vec6f& final_global, cv::Mat_& final_local, const // Perform matrix multiplication in OpenBLAS (fortran call) float alpha1 = 1.0; float beta1 = 1.0; - char* N = "N"; + char N[2]; N[0] = 'N'; sgemm_(N, N, &J.cols, &J_w_t.rows, &J_w_t.cols, &alpha1, (float*)J.data, &J.cols, (float*)J_w_t.data, &J_w_t.cols, &beta1, (float*)Hessian.data, &J.cols); // Above is a fast (but ugly) version of diff --git a/lib/local/LandmarkDetector/src/PDM.cpp b/lib/local/LandmarkDetector/src/PDM.cpp index 4d0edb6f..1b80397b 100644 --- a/lib/local/LandmarkDetector/src/PDM.cpp +++ b/lib/local/LandmarkDetector/src/PDM.cpp @@ -146,7 +146,7 @@ void PDM::CalcShape3D(cv::Mat_& out_shape, const cv::Mat_& p_local int p_local_cols = p_local.cols; int princ_comp_rows = princ_comp.rows; int princ_comp_cols = princ_comp.cols; - char* N = "N"; + char N[2]; N[0] = 'N'; sgemm_(N, N, &p_local_cols, &princ_comp_rows, &princ_comp_cols, &alpha1, (float*)p_local.data, &p_local_cols, (float*)princ_comp.data, &princ_comp_cols, &beta1, (float*)out_shape.data, &p_local_cols); // Above is a fast (but ugly) version of @@ -646,7 +646,7 @@ void PDM::CalcParams(cv::Vec6f& out_params_global, cv::Mat_& out_params_l // Perform matrix multiplication in OpenBLAS (fortran call) float alpha1 = 1.0; float beta1 = 1.0; - char* N = "N"; + char N[2]; N[0] = 'N'; sgemm_(N, N, &J.cols, &J_w_t.rows, &J_w_t.cols, &alpha1, (float*)J.data, &J.cols, (float*)J_w_t.data, &J_w_t.cols, &beta1, (float*)Hessian.data, &J.cols); // Above is a fast (but ugly) version of