From 9e8c759f0db097dfcd5f1b73b32fe0ccf46a4d9f Mon Sep 17 00:00:00 2001 From: TinyO Date: Thu, 17 Oct 2019 13:48:37 +0800 Subject: [PATCH] fix(*): fix 18.04 complie warning. --- CMakeLists.txt | 2 +- include/mynteye/device/device.h | 5 +++++ samples/save_single_image.cc | 14 +++++++++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10eaa68..7ae59c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,7 +151,7 @@ endif() ## libmynteye if(NOT WITH_GLOG AND NOT OS_WIN) - set(__MINIGLOG_FLAGS "-Wno-unused-parameter -Wno-format -Wno-return-type") + set(__MINIGLOG_FLAGS "-Wno-unused-parameter -Wno-format -Wno-return-type -Wno-comment") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${__MINIGLOG_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${__MINIGLOG_FLAGS}") unset(__MINIGLOG_FLAGS) diff --git a/include/mynteye/device/device.h b/include/mynteye/device/device.h index 3f2ab16..156e6f5 100644 --- a/include/mynteye/device/device.h +++ b/include/mynteye/device/device.h @@ -15,6 +15,11 @@ #define MYNTEYE_DEVICE_DEVICE_H_ #pragma once +#include +// undef major & minor for 18.04 gcc +#undef major +#undef minor + #include #include #include diff --git a/samples/save_single_image.cc b/samples/save_single_image.cc index cab1dba..b939765 100644 --- a/samples/save_single_image.cc +++ b/samples/save_single_image.cc @@ -1,4 +1,16 @@ -#include +// Copyright 2018 Slightech Co., Ltd. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. #include #include "mynteye/api/api.h"