Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various warnings and upgrade catch2 to 3.8.0 version #1548

Merged
merged 15 commits into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
--output-file visp-coverage.cleaned

- name: Upload report to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/ubuntu-3rdparty.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-latest]
compiler: [ {CC: /usr/bin/gcc-10, CXX: /usr/bin/g++-10}, {CC: /usr/bin/clang, CXX: /usr/bin/clang++} ]
os: [ubuntu-22.04, ubuntu-latest]
compiler: [ {CC: /usr/bin/gcc, CXX: /usr/bin/g++}, {CC: /usr/bin/clang, CXX: /usr/bin/clang++} ]

steps:
- name: Checkout repository
Expand All @@ -35,12 +35,7 @@ jobs:
- name: Print compiler information
run: dpkg --list | grep compiler

- name: Install dependencies for ubuntu 20.04
if: matrix.os == 'ubuntu-20.04'
run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-22-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev

- name: Install dependencies for ubuntu-latest
if: matrix.os == 'ubuntu-latest'
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev

- name: Clone camera_localization
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/ubuntu-contrib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-latest]
compiler: [ {CC: /usr/bin/gcc-10, CXX: /usr/bin/g++-10}, {CC: /usr/bin/clang, CXX: /usr/bin/clang++} ]
os: [ubuntu-22.04, ubuntu-latest]
compiler: [ {CC: /usr/bin/gcc, CXX: /usr/bin/g++}, {CC: /usr/bin/clang, CXX: /usr/bin/clang++} ]

steps:
- name: Checkout repository
Expand All @@ -35,12 +35,7 @@ jobs:
- name: Print compiler information
run: dpkg --list | grep compiler

- name: Install dependencies for ubuntu 20.04
if: matrix.os == 'ubuntu-20.04'
run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-22-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev

- name: Install dependencies for ubuntu-latest
if: matrix.os == 'ubuntu-latest'
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev

- name: Clone visp_contrib
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/ubuntu-dep-apt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-latest]
compiler: [ {CC: /usr/bin/gcc-9, CXX: /usr/bin/g++-9}, {CC: /usr/bin/gcc-10, CXX: /usr/bin/g++-10}, {CC: /usr/bin/clang, CXX: /usr/bin/clang++} ]
os: [ubuntu-22.04, ubuntu-latest]
compiler: [ {CC: /usr/bin/gcc, CXX: /usr/bin/g++}, {CC: /usr/bin/clang, CXX: /usr/bin/clang++} ]
standard: [ 98, 11, 17 ]

steps:
Expand All @@ -36,12 +36,7 @@ jobs:
- name: Print compiler information
run: dpkg --list | grep compiler

- name: Install dependencies for ubuntu 20.04
if: matrix.os == 'ubuntu-20.04'
run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-22-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev

- name: Install dependencies for ubuntu-latest
if: matrix.os == 'ubuntu-latest'
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev

- name: Clone visp-images
Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/ubuntu-dep-src.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-latest]
os: [ubuntu-22.04, ubuntu-latest]

steps:
- name: Checkout repository
Expand All @@ -35,25 +35,14 @@ jobs:
- name: Print OS information
run: lsb_release -a

- name: Install dependencies for ubuntu 20.04
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get update && sudo apt-get install -y libdc1394-22-dev

- name: Install common dependencies for ubuntu
run: |
sudo apt-get update
sudo apt-get install -y libx11-dev libv4l-dev gfortran liblapack-dev libeigen3-dev
sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev gfortran liblapack-dev libeigen3-dev
sudo apt-get install -y libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev
sudo apt-get install -y mesa-common-dev mesa-utils freeglut3-dev libflann-dev libboost-all-dev
sudo apt-get install -y nlohmann-json3-dev

- name: Install dependencies for ubuntu-latest
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev gfortran liblapack-dev libeigen3-dev
sudo apt-get update && sudo apt-get install -y libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev

- name: Build OpenBLAS from source
run: |
pwd
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-ogre-apt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-latest]
compiler: [ {CC: /usr/bin/gcc-9, CXX: /usr/bin/g++-9}, {CC: /usr/bin/gcc-10, CXX: /usr/bin/g++-10}, {CC: /usr/bin/clang, CXX: /usr/bin/clang++} ]
compiler: [ {CC: /usr/bin/gcc, CXX: /usr/bin/g++}, {CC: /usr/bin/clang, CXX: /usr/bin/clang++} ]
standard: [ 11, 17 ]
ogre: [ogre-1.9, ogre-1.12]

Expand Down
15 changes: 2 additions & 13 deletions .github/workflows/ubuntu-ogre-src.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-latest]
os: [ubuntu-22.04, ubuntu-latest]

steps:
- name: Checkout repository
Expand All @@ -35,25 +35,14 @@ jobs:
- name: Print OS information
run: lsb_release -a

- name: Install dependencies for ubuntu 20.04
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get update && sudo apt-get install -y libdc1394-22-dev

- name: Install common dependencies for ubuntu
run: |
sudo apt-get update
sudo apt-get install -y libx11-dev libv4l-dev gfortran liblapack-dev libeigen3-dev
sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev gfortran liblapack-dev libeigen3-dev
sudo apt-get install -y libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev
sudo apt-get install -y mesa-common-dev mesa-utils freeglut3-dev libflann-dev libboost-all-dev
sudo apt-get install -y nlohmann-json3-dev

- name: Install dependencies for ubuntu-latest
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev gfortran liblapack-dev libeigen3-dev
sudo apt-get update && sudo apt-get install -y libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev

- name: Install Ogre dependencies
run: |
sudo apt-get update && sudo apt-get install -y libgles2-mesa-dev libvulkan-dev glslang-dev libxrandr-dev libxaw7-dev libx11-dev libzzip-dev libsdl2-dev
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/ubuntu-ustk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-latest]
os: [ubuntu-22.04, ubuntu-latest]

steps:
- name: Checkout repository
Expand All @@ -34,12 +34,7 @@ jobs:
- name: Print compiler information
run: dpkg --list | grep compiler

- name: Install dependencies for ubuntu 20.04
if: matrix.os == 'ubuntu-20.04'
run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-22-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev

- name: Install dependencies for ubuntu-latest
if: matrix.os == 'ubuntu-latest'
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-dev libv4l-dev liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev nlohmann-json3-dev

- name: Clone visp-images
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/catch2/README.VISP
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ CONTENT:
--------

The catch_amalgamated.hpp and catch_amalgamated.cpp files are a copy of the latest version of the single header that
was downloaded from https://github.com/catchorg/Catch2/releases/tag/v3.7.1
was downloaded from https://github.com/catchorg/Catch2/releases/tag/v3.8.0
32 changes: 19 additions & 13 deletions 3rdparty/catch2/catch_amalgamated.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

// SPDX-License-Identifier: BSL-1.0

// Catch v3.7.1
// Generated: 2024-09-17 10:36:45.608896
// Catch v3.8.0
// Generated: 2025-01-06 00:39:54.679994
// ----------------------------------------------------------
// This file is an amalgamation of multiple different files.
// You probably shouldn't edit it directly.
Expand Down Expand Up @@ -332,7 +332,7 @@ namespace Catch {
double diff = b - m;
return a + diff * diff;
} ) /
( last - first );
static_cast<double>( last - first );
return std::sqrt( variance );
}

Expand Down Expand Up @@ -367,7 +367,7 @@ namespace Catch {
double* first,
double* last ) {
auto count = last - first;
double idx = (count - 1) * k / static_cast<double>(q);
double idx = static_cast<double>((count - 1) * k) / static_cast<double>(q);
int j = static_cast<int>(idx);
double g = idx - j;
std::nth_element(first, first + j, last);
Expand Down Expand Up @@ -470,10 +470,10 @@ namespace Catch {

double accel = sum_cubes / ( 6 * std::pow( sum_squares, 1.5 ) );
long n = static_cast<long>( resample.size() );
double prob_n =
double prob_n = static_cast<double>(
std::count_if( resample.begin(),
resample.end(),
[point]( double x ) { return x < point; } ) /
[point]( double x ) { return x < point; } )) /
static_cast<double>( n );
// degenerate case with uniform samples
if ( Catch::Detail::directCompare( prob_n, 0. ) ) {
Expand Down Expand Up @@ -1926,7 +1926,7 @@ namespace Catch {
return static_cast<unsigned int>(getElapsedMicroseconds()/1000);
}
auto Timer::getElapsedSeconds() const -> double {
return getElapsedMicroseconds()/1000000.0;
return static_cast<double>(getElapsedMicroseconds())/1000000.0;
}


Expand All @@ -1946,7 +1946,10 @@ namespace Detail {
const int hexThreshold = 255;

struct Endianness {
enum Arch { Big, Little };
enum Arch : uint8_t {
Big,
Little
};

static Arch which() {
int one = 1;
Expand Down Expand Up @@ -2280,7 +2283,7 @@ namespace Catch {
}

Version const& libraryVersion() {
static Version version( 3, 7, 1, "", 0 );
static Version version( 3, 8, 0, "", 0 );
return version;
}

Expand Down Expand Up @@ -3516,7 +3519,7 @@ namespace {
#endif // Windows/ ANSI/ None


#if defined( CATCH_PLATFORM_LINUX ) || defined( CATCH_PLATFORM_MAC )
#if defined( CATCH_PLATFORM_LINUX ) || defined( CATCH_PLATFORM_MAC ) || defined( __GLIBC__ )
# define CATCH_INTERNAL_HAS_ISATTY
# include <unistd.h>
#endif
Expand Down Expand Up @@ -5258,7 +5261,7 @@ namespace {
SimplePcg32::result_type SimplePcg32::operator()() {
// prepare the output value
const uint32_t xorshifted = static_cast<uint32_t>(((m_state >> 18u) ^ m_state) >> 27u);
const auto output = rotate_right(xorshifted, m_state >> 59u);
const auto output = rotate_right(xorshifted, static_cast<uint32_t>(m_state >> 59u));

// advance state
m_state = m_state * 6364136223846793005ULL + s_inc;
Expand Down Expand Up @@ -9108,7 +9111,7 @@ struct RowBreak {};
struct OutputFlush {};

class Duration {
enum class Unit {
enum class Unit : uint8_t {
Auto,
Nanoseconds,
Microseconds,
Expand Down Expand Up @@ -9180,7 +9183,10 @@ class Duration {
};
} // end anon namespace

enum class Justification { Left, Right };
enum class Justification : uint8_t {
Left,
Right
};

struct ColumnInfo {
std::string name;
Expand Down
Loading
Loading