This fixes log files sent earlier today by @hobbes1069. 

I can confirm most of them, but some files are not compiled as I do not have 
some plugins compiling due to not having libraries. I tried my best to match 
the warnings to the files that I had to do by hand, but I would not be 
surprised in the least if I missed some. 

In other thoughts, I feel as though this could be done much more elegantly. 

Currently, I repeated this a lot: 

```c++
size_t b = fwrite (data, sizeof(float), m_spec.width, m_file);
if (b != (size_t)m_spec.width) {
        error ("Failed write zfile::open (err: %d)", b);
        return false;
}```

In one file, I was able to use a simple macro, but perhaps this is something 
that could be addressed through an inline method or a better defined set. Just 
some thoughts. 

Oh, and all criticism is welcome, what ever there may be. I want to learn more!

You can merge this Pull Request by running:

  git pull https://github.com/Nava2/oiio warning-fixes

Or you can view, comment on it, or merge it online at:

  https://github.com/OpenImageIO/oiio/pull/396

-- Commit Summary --

* Ignored Eclipse files.
* Sysutil::put_in_background -> returns true if fork was successful.
* Fixes error where strncpy was copying max 200 chars which is greater than the 
structs' 100 char size. Lowered the max copy to 100 chars as is appropriate 
with the File Header.
* Fixes an unused variable. It was set to 0 then left there. I also
* Fixed a small issue with defining INLINE, now will be recognized on more 
platforms (if not all)
* Fixes two fread problems, both return false and act as other parts do.
* Fixes two unused variables, similar: two booleans for printed that were 
ignored. Little bit of copy paste.
* Fixes all of the warnings in the .log supplied by Richard (@hobbes1069).. 
hopefully.

-- File Changes --

M .gitignore (3)
M src/bmp.imageio/bmp_pvt.cpp (27)
M src/bmp.imageio/bmpoutput.cpp (4)
M src/dpx.imageio/libdpx/DPXHeader.h (2)
M src/fits.imageio/fitsoutput.cpp (12)
M src/hdr.imageio/rgbe.cpp (207)
M src/ico.imageio/icooutput.cpp (89)
M src/iinfo/iinfo.cpp (4)
M src/jpeg2000.imageio/jpeg2000output.cpp (6)
M src/libtexture/imagecache.cpp (4)
M src/libtexture/texturesys.cpp (19)
M src/libutil/sysutil.cpp (4)
M src/oiiotool/printinfo.cpp (4)
M src/ptex.imageio/ptex/PtexWriter.cpp (10)
M src/sgi.imageio/sgioutput.cpp (38)
M src/targa.imageio/targaoutput.cpp (224)
M src/tiff.imageio/tiffinput.cpp (6)
M src/webp.imageio/webpinput.cpp (8)
M src/webp.imageio/webpoutput.cpp (6)
M src/zfile.imageio/zfile.cpp (19)

-- Patch Links --

  https://github.com/OpenImageIO/oiio/pull/396.patch
  https://github.com/OpenImageIO/oiio/pull/396.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenImageIO/oiio/pull/396
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to