Removing unused headers thanks to IWYU

This commit is contained in:
Luis Díaz Más 2022-03-04 18:09:22 +01:00
parent 3f3b651c04
commit 8b1fe379a1
47 changed files with 81 additions and 267 deletions

View File

@ -14,8 +14,9 @@
// *****************************************************************************
#include "exiv2lib_export.h"
// included header files
#include "types.hpp"
#include <bits/exception.h> // for exception
#include <sstream> // for operator<<, ostream, ostringstream, bas...
#include <string> // for basic_string, string
// *****************************************************************************
// namespace extensions

View File

@ -14,9 +14,7 @@
// + standard includes
#include <fcntl.h> // _O_BINARY in FileIo::FileIo
#include <sys/stat.h> // for stat, chmod
#include <sys/types.h> // for stat, chmod
#include <cassert>
#include <cstdio> // for remove, rename
#include <cstdlib> // for alloc, realloc, free
#include <cstring> // std::memcpy
@ -24,8 +22,6 @@
#include <filesystem>
#include <fstream> // write the temporary file
#include <iostream>
#include <memory>
#include <string>
#ifdef EXV_HAVE_SYS_MMAN_H
# include <sys/mman.h> // for mmap and munmap

View File

@ -4,8 +4,6 @@
Author(s): Marco Piovanelli, Ovolab (marco)
History: 05-Mar-2007, marco: created
*/
// included header files
#include "config.h"
#include "basicio.hpp"
#include "bmpimage.hpp"
@ -15,7 +13,6 @@
// + standard includes
#include <cstring>
#include <iostream>
#include <string>
// *****************************************************************************

View File

@ -20,10 +20,6 @@
#include <string>
#include <sstream>
#include <iomanip>
#include <ios>
#include <algorithm>
#include <cassert>
#include <cstring>
#include <cmath>
// *****************************************************************************

View File

@ -17,7 +17,6 @@
// *****************************************************************************
// included header files
#include "tags.hpp"
#include "types.hpp"
// *****************************************************************************
// namespace extensions

View File

@ -12,10 +12,8 @@
#include "i18n.h" // NLS support.
// + standard includes
#include <string>
#include <sstream>
#include <iomanip>
#include <cassert>
#include <cstring>
#include <vector>

View File

@ -19,14 +19,8 @@
#include "unused.h"
// + standard includes
#include <stdio.h> // for snprintf (C99)
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <ios>
#include <iostream>
#include <sstream>
#include <utility>
#if defined WIN32 && !defined __CYGWIN__
# include <windows.h>

View File

@ -1,23 +1,15 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// included header files
#include "config.h"
#include "cr2image.hpp"
#include "tiffimage.hpp"
#include "config.h"
#include "cr2header_int.hpp"
#include "tiffcomposite_int.hpp"
#include "tiffimage_int.hpp"
#include "image.hpp"
#include "error.hpp"
#include "futils.hpp"
#include "i18n.h" // NLS support.
// + standard includes
#include <iostream>
#include <iomanip>
#include <cassert>
#include <cstring>
#include "image.hpp"
#include "tiffcomposite_int.hpp"
#include "tiffimage_int.hpp"
// *****************************************************************************
// class member definitions

View File

@ -11,20 +11,7 @@
#include "crwimage_int.hpp"
#include "error.hpp"
#include "futils.hpp"
#include "value.hpp"
#include "tags.hpp"
#include "tags_int.hpp"
// + standard includes
#include <iostream>
#include <iomanip>
#include <stack>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cmath>
#include <cassert>
// *****************************************************************************
// class member definitions

View File

@ -9,11 +9,8 @@
#include "datasets.hpp"
#include "error.hpp"
#include "types.hpp"
#include "value.hpp"
#include "metadatum.hpp"
#include "i18n.h" // NLS support.
#include <iostream>
#include <iomanip>
#include <regex>
#include <sstream>

View File

@ -2,6 +2,7 @@
// included header files
#include "error.hpp"
#include "types.hpp"
#include "i18n.h" // NLS support.
// + standard includes

View File

@ -8,28 +8,25 @@
*/
// *****************************************************************************
// included header files
#include "config.h"
#include "exif.hpp"
#include "basicio.hpp"
#include "config.h"
#include "error.hpp"
#include "metadatum.hpp"
#include "tags.hpp"
#include "tags_int.hpp"
#include "value.hpp"
#include "types.hpp"
#include "error.hpp"
#include "basicio.hpp"
#include "tiffcomposite_int.hpp" // for Tag::root
#include "tiffimage.hpp"
#include "tiffimage_int.hpp"
#include "tiffcomposite_int.hpp" // for Tag::root
#include "types.hpp"
#include "value.hpp"
// + standard includes
#include <iostream>
#include <sstream>
#include <utility>
#include <algorithm>
#include <cstring>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <utility>
// *****************************************************************************
namespace {

View File

@ -11,15 +11,9 @@
#include "types.hpp"
#include "fujimn_int.hpp"
#include "tags_int.hpp"
#include "value.hpp"
#include "i18n.h" // NLS support.
// + standard includes
#include <string>
#include <sstream>
#include <iomanip>
#include <cassert>
#include <cstring>
// *****************************************************************************
// class member definitions

View File

@ -1,16 +1,14 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// included header files
#include "config.h"
#include "futils.hpp"
#include "datasets.hpp"
#include "enforce.hpp"
#include "image_int.hpp"
#include "config.h"
// + standard includes
#include <algorithm>
#include <array>
#include <cstring>
#include <filesystem>
#include <sstream>
#include <stdexcept>

View File

@ -1,14 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// included header files
#include "config.h"
#include "gifimage.hpp"
#include "config.h"
#include "error.hpp"
#include "futils.hpp"
#include <iostream>
// *****************************************************************************
// class member definitions
namespace Exiv2 {
@ -16,7 +14,7 @@ namespace Exiv2 {
GifImage::GifImage(BasicIo::UniquePtr io)
: Image(ImageType::gif, mdNone, std::move(io))
{
} // GifImage::GifImage
}
std::string GifImage::mimeType() const
{

View File

@ -12,7 +12,6 @@
#include <stdio.h>
#include <array>
#include <sys/stat.h>
////////////////////////////////////////
// platform specific code
@ -25,11 +24,8 @@
#define closesocket close
#include <unistd.h>
#include <strings.h>
#include <errno.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/uio.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <arpa/inet.h>

View File

@ -1,57 +1,49 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// included header files
#include "config.h"
#include "image.hpp"
#include "image_int.hpp"
#include "error.hpp"
#include "config.h"
#include "enforce.hpp"
#include "error.hpp"
#include "futils.hpp"
#include "image_int.hpp"
#include "safe_op.hpp"
#include "slice.hpp"
#ifdef EXV_ENABLE_BMFF
#ifdef EXV_ENABLE_BMFF
#include "bmffimage.hpp"
#endif// EXV_ENABLE_BMFF
#endif // EXV_ENABLE_BMFF
#include "cr2image.hpp"
#include "crwimage.hpp"
#include "epsimage.hpp"
#include "jpgimage.hpp"
#include "mrwimage.hpp"
#ifdef EXV_HAVE_LIBZ
# include "pngimage.hpp"
#endif// EXV_HAVE_LIBZ
#include "rafimage.hpp"
#include "tiffimage.hpp"
#include "tiffimage_int.hpp"
#include "tiffcomposite_int.hpp"
#include "tiffvisitor_int.hpp"
#include "webpimage.hpp"
#include "orfimage.hpp"
#include "gifimage.hpp"
#include "psdimage.hpp"
#include "tgaimage.hpp"
#ifdef EXV_HAVE_LIBZ
#include "pngimage.hpp"
#endif // EXV_HAVE_LIBZ
#include "bmpimage.hpp"
#include "gifimage.hpp"
#include "jp2image.hpp"
#include "nikonmn_int.hpp"
#include "rw2image.hpp"
#include "orfimage.hpp"
#include "pgfimage.hpp"
#include "psdimage.hpp"
#include "rafimage.hpp"
#include "rw2image.hpp"
#include "tags_int.hpp"
#include "tgaimage.hpp"
#include "tiffimage.hpp"
#include "webpimage.hpp"
#include "xmpsidecar.hpp"
// + standard includes
#include <cerrno>
#include <cassert>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <iostream>
#include <limits>
#include <set>
#include <sys/types.h>
#include <sys/stat.h>
// *****************************************************************************
namespace {

View File

@ -2,10 +2,12 @@
#include "image_int.hpp"
#include <cassert>
#include <cstdarg>
#include <cstddef>
#include <cstring>
#include <cstdio>
#include <cstring>
#include <vector>
namespace Exiv2::Internal {
std::string stringFormat(const char* format, ...)

View File

@ -5,9 +5,11 @@
// *****************************************************************************
// included header files
#include "types.hpp"
#include "slice.hpp" // for Slice
// + standard includes
#include <stddef.h> // for size_t
#include <stdint.h> // for int32_t
#include <ostream> // for ostream, basic_ostream::put
#include <string>
#if (defined(__GNUG__) || defined(__GNUC__)) || defined(__clang__)

View File

@ -7,7 +7,6 @@
//
// https://github.com/benhoyt/inih
#include "config.h"
#include "ini.hpp"
#include <algorithm>
@ -18,7 +17,6 @@ using std::string;
using namespace Exiv2;
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#if !INI_USE_STACK

View File

@ -2,18 +2,16 @@
// included header files
#include "iptc.hpp"
#include "types.hpp"
#include "error.hpp"
#include "enforce.hpp"
#include "value.hpp"
#include "datasets.hpp"
#include "jpgimage.hpp"
#include "enforce.hpp"
#include "error.hpp"
#include "image_int.hpp"
#include "types.hpp"
#include "value.hpp"
// + standard includes
#include <iostream>
#include <algorithm>
#include <fstream> // write the temporary file
// *****************************************************************************
namespace {

View File

@ -14,14 +14,6 @@
#include "types.hpp"
#include "safe_op.hpp"
// + standard includes
#include <array>
#include <string>
#include <cstring>
#include <iostream>
#include <cassert>
#include <cstdio>
// JPEG-2000 box types
const uint32_t kJp2BoxTypeJp2Header = 0x6a703268; // 'jp2h'
const uint32_t kJp2BoxTypeImageHeader = 0x69686472; // 'ihdr'

View File

@ -4,7 +4,6 @@
#include "config.h"
#include "jpgimage.hpp"
#include "tiffimage.hpp"
#include "image_int.hpp"
#include "error.hpp"
#include "futils.hpp"
@ -22,14 +21,6 @@
#include "fff.h"
// + standard includes
#include <algorithm> // for EOF
#include <cstdio> // for EOF
#include <cstring>
#include <cassert>
#include <stdexcept>
#include <iostream>
// *****************************************************************************
// class member definitions

View File

@ -11,21 +11,18 @@
#include "ini.hpp"
#include "tiffcomposite_int.hpp"
#include "tiffvisitor_int.hpp"
#include "tiffimage.hpp"
#include "tiffimage_int.hpp"
#include "utils.hpp"
// + standard includes
#include <array>
#include <filesystem>
#include <fstream>
#include <iostream>
namespace fs = std::filesystem;
#if !defined(_MSC_VER) && !defined(__MINGW__)
#include <unistd.h>
#include <sys/types.h>
#include <pwd.h>
#else
#include <shlobj.h>

View File

@ -5,13 +5,14 @@
// *****************************************************************************
// included header files
#include "tifffwd_int.hpp"
#include "tags_int.hpp"
#include "types.hpp"
// *****************************************************************************
// namespace extensions
namespace Exiv2::Internal {
class IoWrapper;
class TiffComponent;
// *****************************************************************************
// function prototypes
/*!

View File

@ -1,15 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// included header files
#include "metadatum.hpp"
// + standard includes
#include <iostream>
#include <iomanip>
// *****************************************************************************
// class member definitions
namespace Exiv2 {
Key::UniquePtr Key::clone() const

View File

@ -7,16 +7,12 @@
#include "value.hpp"
#include "exif.hpp"
#include "i18n.h" // NLS support.
#include "datasets.hpp"
#include <string>
#include <sstream>
#include <iomanip>
#include <cassert>
#include <cstring>
#include <stdio.h> // popen to call exiftool
#include <string.h>
// *****************************************************************************
// class member definitions

View File

@ -6,10 +6,6 @@
// *****************************************************************************
// included header files
#include "tags.hpp"
#include "types.hpp"
// + standard includes
#include <iosfwd>
// *****************************************************************************
// namespace extensions

View File

@ -1,30 +1,22 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// included header files
#include "config.h"
#include "mrwimage.hpp"
#include "tiffimage.hpp"
#include "image.hpp"
#include "basicio.hpp"
#include "error.hpp"
#include "config.h"
#include "enforce.hpp"
#include "error.hpp"
#include "futils.hpp"
#include "image.hpp"
#include "tiffimage.hpp"
// + standard includes
#include <string>
#include <cstring>
#include <iostream>
#include <cassert>
// *****************************************************************************
// class member definitions
namespace Exiv2 {
MrwImage::MrwImage(BasicIo::UniquePtr io, bool /*create*/)
: Image(ImageType::mrw, mdExif | mdIptc | mdXmp, std::move(io))
{
} // MrwImage::MrwImage
}
std::string MrwImage::mimeType() const
{

View File

@ -1,24 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// included header files
#include "types.hpp"
#include "nikonmn_int.hpp"
#include "value.hpp"
#include "image.hpp"
#include "tags_int.hpp"
#include "exif.hpp"
#include "i18n.h" // NLS support.
#include "makernote_int.hpp"
#include "error.hpp"
#include "i18n.h" // NLS support.
#include "tags_int.hpp"
#include "value.hpp"
// + standard includes
#include <string>
#include <sstream>
#include <iomanip>
#include <cassert>
#include <cstring>
#include <math.h> //for log, pow, abs
#include <cmath>
#include <limits>
// *****************************************************************************
// class member definitions

View File

@ -18,12 +18,6 @@
// *****************************************************************************
// included header files
#include "tags.hpp"
#include "types.hpp"
// + standard includes
#include <string>
#include <iosfwd>
#include <memory>
// *****************************************************************************
// namespace extensions

View File

@ -2,20 +2,13 @@
// *****************************************************************************
// included header files
#include "types.hpp"
#include "olympusmn_int.hpp"
#include "value.hpp"
#include "image.hpp"
#include "tags_int.hpp"
#include "makernote_int.hpp"
#include "i18n.h" // NLS support.
// + standard includes
#include <string>
#include <sstream>
#include <iomanip>
#include <cassert>
#include <cstring>
#include "exif.hpp"
#include "i18n.h" // NLS support.
#include "makernote_int.hpp"
#include "tags_int.hpp"
#include "value.hpp"
// *****************************************************************************
// class member definitions

View File

@ -13,12 +13,9 @@
// *****************************************************************************
// included header files
#include "tags.hpp"
#include "types.hpp"
// + standard includes
#include <string>
#include <iosfwd>
#include <memory>
// *****************************************************************************
// namespace extensions

View File

@ -6,7 +6,6 @@
// *****************************************************************************
// included header files
#include "tiffimage_int.hpp"
#include "types.hpp"
// *****************************************************************************
// namespace extensions

View File

@ -8,11 +8,8 @@
#include "i18n.h" // NLS support.
// + standard includes
#include <string>
#include <sstream>
#include <iomanip>
#include <cassert>
#include <cstring>
// *****************************************************************************
// class member definitions

View File

@ -6,7 +6,6 @@
// *****************************************************************************
// included header files
#include "tags.hpp"
#include "types.hpp"
// *****************************************************************************
// namespace extensions

View File

@ -7,12 +7,8 @@
#include "value.hpp"
#include "exif.hpp"
#include "tags.hpp"
#include "metadatum.hpp"
#include "i18n.h" // NLS support.
// + standard includes
#include <string>
// *****************************************************************************
// class member definitions
namespace Exiv2::Internal {

View File

@ -1,22 +1,14 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// included header files
#include "config.h"
#include "pgfimage.hpp"
#include "image.hpp"
#include "pngimage.hpp"
#include "basicio.hpp"
#include "config.h"
#include "enforce.hpp"
#include "error.hpp"
#include "futils.hpp"
// + standard includes
#include <cstdio> // for EOF
#include <string>
#include <cstring>
#include <iostream>
#include <cassert>
#include "image.hpp"
// Signature from front of PGF file
const unsigned char pgfSignature[3] = { 0x50, 0x47, 0x46 };

View File

@ -24,7 +24,6 @@
#include <cstring>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <string>
/*

View File

@ -8,11 +8,8 @@
#include "i18n.h" // NLS support.
// + standard includes
#include <string>
#include <sstream>
#include <iomanip>
#include <cassert>
#include <cstring>
// *****************************************************************************
// class member definitions

View File

@ -6,7 +6,6 @@
// *****************************************************************************
// included header files
#include "tags.hpp"
#include "types.hpp"
// *****************************************************************************
// namespace extensions

View File

@ -10,9 +10,6 @@
// + standard includes
#include <string>
#include <sstream>
#include <iomanip>
#include <cassert>
#include <cstring>
// *****************************************************************************
// class member definitions

View File

@ -6,7 +6,6 @@
// *****************************************************************************
// included header files
#include "tags.hpp"
#include "types.hpp"
// *****************************************************************************
// namespace extensions

View File

@ -1,21 +1,14 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// included header files
#include "types.hpp"
#include "minoltamn_int.hpp"
#include "sonymn_int.hpp"
#include "tags_int.hpp"
#include "exif.hpp"
#include "i18n.h" // NLS support.
#include "minoltamn_int.hpp"
#include "tiffcomposite_int.hpp"
#include "value.hpp"
#include "exif.hpp"
#include "i18n.h" // NLS support.
// + standard includes
#include <string>
#include <sstream>
#include <iomanip>
#include <cassert>
#include <cstring>
#include <cmath>
// *****************************************************************************

View File

@ -11,13 +11,6 @@
#include "error.hpp"
#include "enforce.hpp"
// + standard includes
#include <string>
#include <cstring>
#include <iostream>
#include <iomanip>
#include <algorithm>
// *****************************************************************************
namespace {
//! Add \em tobe - \em curr 0x00 filler bytes if necessary

View File

@ -8,8 +8,6 @@
#include "tiffvisitor_int.hpp"
#include "i18n.h" // NLS support.
#include <iostream>
// Shortcuts for the newTiffBinaryArray templates.
#define EXV_BINARY_ARRAY(arrayCfg, arrayDef) (newTiffBinaryArray0<&arrayCfg, EXV_COUNTOF(arrayDef), arrayDef>)
#define EXV_SIMPLE_BINARY_ARRAY(arrayCfg) (newTiffBinaryArray1<&arrayCfg>)

View File

@ -6,24 +6,14 @@
#include "tiffcomposite_int.hpp" // Do not change the order of these 2 includes,
#include "tiffvisitor_int.hpp" // see bug #487
#include "tiffimage_int.hpp"
#include "image_int.hpp"
#include "makernote_int.hpp"
#include "exif.hpp"
#include "enforce.hpp"
#include "iptc.hpp"
#include "value.hpp"
#include "image.hpp"
#include "jpgimage.hpp"
#include "sonymn_int.hpp"
#include "i18n.h" // NLS support.
// + standard includes
#include <string>
#include <iostream>
#include <iomanip>
#include <cassert>
#include <limits>
#include <ostream>
// *****************************************************************************
namespace {