Skip to content

Commit

Permalink
Changes to take care of new clang 15 warnings (#3563)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgritz committed Sep 23, 2022
1 parent f150089 commit 602c43c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ NEW or CHANGED MINIMUM dependencies since the last major release are **bold**.
* **C++14** (also builds with C++17, and C++20)
* The default build mode is C++14. This can be controlled by via the
CMake configuration flag: `-DCMAKE_CXX_STANDARD=17`, etc.
* Compilers: **gcc 6.1 - 11.2**, **clang 3.4 - 14**, **MSVS 2017 - 2019**,
* Compilers: **gcc 6.1 - 12.1**, **clang 3.4 - 15**, **MSVS 2017 - 2019**,
**Intel icc 17+**, **Intel OneAPI C++ compiler 2022+**.
* CMake >= 3.12 (tested through 3.24)
* OpenEXR/Imath >= 2.0 (recommended: 2.4 or higher; tested through 3.1)
Expand Down
15 changes: 9 additions & 6 deletions site/spi/Makefile-bits
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,15 @@ else ifeq (${platform}, macosx)
MY_CMAKE_FLAGS += \
-DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11
USE_LIBCPLUSPLUS := 0
else ifeq (${COMPILER},clang9)
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/opt/llvm@9/bin/clang \
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@9/bin/clang++
else ifeq (${COMPILER},clang11)
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/opt/llvm@11/bin/clang \
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@11/bin/clang++
else ifeq (${COMPILER},clang13)
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/opt/llvm@13/bin/clang \
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@13/bin/clang++
else ifeq (${COMPILER},clang14)
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/opt/llvm@14/bin/clang \
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@14/bin/clang++
else ifeq (${COMPILER},clang15)
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=/usr/local/opt/llvm@15/bin/clang \
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@15/bin/clang++
else ifeq (${COMPILER},clang)
MY_CMAKE_FLAGS += -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
else ifeq (${COMPILER},gcc)
Expand Down
2 changes: 0 additions & 2 deletions src/libtexture/environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -523,11 +523,9 @@ TextureSystemImpl::environment(TextureHandle* texture_handle_,

float levelweight[2] = { 1.0f - levelblend, levelblend };

int npointson = 0;
for (int level = 0; level < 2; ++level) {
if (!levelweight[level])
continue;
++npointson;
int lev = miplevel[level];
if (options.interpmode == TextureOpt::InterpSmartBicubic) {
if (lev == 0
Expand Down
4 changes: 0 additions & 4 deletions src/libutil/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,15 +519,11 @@ task_set::wait(bool block)
int tries = 0;
while (1) {
bool all_finished = true;
int nfutures = 0, finished = 0;
for (auto&& f : m_futures) {
// Asking future.wait_for for 0 time just checks the status.
++nfutures;
auto status = f.wait_for(wait_time);
if (status != std::future_status::ready)
all_finished = false;
else
++finished;
}
if (all_finished) // All futures are ready? We're done.
break;
Expand Down
2 changes: 1 addition & 1 deletion src/oiiotool/oiiotool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ parse_channels(const ImageSpec& spec, string_view chanlist,
{
bool ok = true;
channels.clear();
for (int c = 0; chanlist.length(); ++c) {
while (chanlist.length()) {
int chan = -1;
Strutil::skip_whitespace(chanlist);
string_view name = Strutil::parse_until(chanlist, ",");
Expand Down

0 comments on commit 602c43c

Please sign in to comment.