Review: Fix or suppress warnings with clang #326

Merged
merged 1 commit into from Apr 18, 2012
Jump to file or symbol
Failed to load files and symbols.
+11 −10
Diff settings

Always

Just for now

View
@@ -89,6 +89,8 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_definitions ("-Wno-char-subscripts")
add_definitions ("-Wno-unused-function")
add_definitions ("-Wno-overloaded-virtual")
+ add_definitions ("-Wno-delete-non-virtual-dtor")

This comment has been minimized.

Show comment Hide comment
@fpsunflower

fpsunflower Apr 18, 2012

Contributor

Is it not possible to get the code building cleanly without these flags? I think many were coming from boost, but now that you added SYSTEM they should be silenced.

@fpsunflower

fpsunflower Apr 18, 2012

Contributor

Is it not possible to get the code building cleanly without these flags? I think many were coming from boost, but now that you added SYSTEM they should be silenced.

This comment has been minimized.

Show comment Hide comment
@lgritz

lgritz Apr 18, 2012

Contributor

SYSTEM didn't do anything, at least not on my Mac.

@lgritz

lgritz Apr 18, 2012

Contributor

SYSTEM didn't do anything, at least not on my Mac.

This comment has been minimized.

Show comment Hide comment
@fpsunflower

fpsunflower Apr 18, 2012

Contributor

Let me see if I can get it to do something on my end.

@fpsunflower

fpsunflower Apr 18, 2012

Contributor

Let me see if I can get it to do something on my end.

+ add_definitions ("-Wno-shift-count-negative")

This comment has been minimized.

Show comment Hide comment
@fpsunflower

fpsunflower Apr 18, 2012

Contributor

Are you sure these aren't legitimate bugs? I don't think negative shifting is allowed by the C standard.

@fpsunflower

fpsunflower Apr 18, 2012

Contributor

Are you sure these aren't legitimate bugs? I don't think negative shifting is allowed by the C standard.

This comment has been minimized.

Show comment Hide comment
@lgritz

lgritz Apr 18, 2012

Contributor

No?
OK, I'll look at these again.

@lgritz

lgritz Apr 18, 2012

Contributor

No?
OK, I'll look at these again.

endif ()
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
@@ -82,11 +82,9 @@ endmacro ()
message (STATUS "BOOST_ROOT ${BOOST_ROOT}")
-set (Boost_ADDITIONAL_VERSIONS "1.45" "1.44"
+set (Boost_ADDITIONAL_VERSIONS "1.49" "1.48" "1.47" "1.46" "1.45" "1.44"
"1.43" "1.43.0" "1.42" "1.42.0"
- "1.41" "1.41.0" "1.40" "1.40.0"
- "1.39" "1.39.0" "1.38" "1.38.0"
- "1.37" "1.37.0" "1.34.1" "1_34_1")
+ "1.41" "1.41.0" "1.40" "1.40.0")
if (LINKSTATIC)
set (Boost_USE_STATIC_LIBS ON)
endif ()
@@ -96,7 +94,7 @@ if (BOOST_CUSTOM)
# N.B. For a custom version, the caller had better set up the variables
# Boost_VERSION, Boost_INCLUDE_DIRS, Boost_LIBRARY_DIRS, Boost_LIBRARIES.
else ()
- find_package (Boost 1.34 REQUIRED
+ find_package (Boost 1.40 REQUIRED
COMPONENTS filesystem regex system thread
)
# Try to figure out if this boost distro has Boost::python. If we
@@ -158,7 +156,7 @@ if (NOT oiio_boost_PYTHON_FOUND)
set (PYTHONLIBS_FOUND OFF)
endif ()
-include_directories ("${Boost_INCLUDE_DIRS}")
+include_directories (SYSTEM "${Boost_INCLUDE_DIRS}")
link_directories ("${Boost_LIBRARY_DIRS}")
# end Boost setup
@@ -261,7 +261,7 @@ Jpeg2000Input::create_decompressor()
int magic[3];
if (::fread (&magic, 4, 3, m_file) != 3) {
error ("Empty file \"%s\"", m_filename.c_str());
- return false;
+ return NULL;
}
opj_dinfo_t* dinfo = NULL;
if (isJp2File(magic))
@@ -41,8 +41,8 @@ ImageBufWrap::ImageBufWrap (const std::string &name,
m_buf = new ImageBuf(name, spec);
}
-ImageBufWrap::ImageBufWrap (const std::string &name = std::string(),
- ImageCacheWrap *icw = NULL) {
+ImageBufWrap::ImageBufWrap (const std::string &name,
+ ImageCacheWrap *icw) {
// TODO: this isn't done properly. It should not take NULL as
// 2nd argument, the proper way would be icw->Cache
// It's like this just for the initial tests.
View
@@ -170,7 +170,8 @@ class ImageBufWrap {
ImageBuf *m_buf;
public:
- ImageBufWrap (const std::string&, ImageCacheWrap*);
+ ImageBufWrap (const std::string&name = std::string(),
+ ImageCacheWrap*icw = NULL);
ImageBufWrap (const std::string&, const ImageSpec&) ;
void clear ();
void reset_to_new_image (const std::string&, ImageCache*);