Warning pragmas

This commit is contained in:
Dan Paulat 2023-04-17 18:34:04 -05:00
parent d8b669262c
commit cdd4ced28e
7 changed files with 63 additions and 2 deletions

View file

@ -63,6 +63,12 @@ struct DirListSAXData
std::vector<DirListRecord> records_;
};
// Unspecified fields are initialized to zero, ignore warning
#if defined(__GNUC__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#endif
static htmlSAXHandler saxHandler_ //
{.startElement = &DirListSAXHandler::StartElement,
.endElement = &DirListSAXHandler::EndElement,
@ -71,6 +77,10 @@ static htmlSAXHandler saxHandler_ //
.error = &DirListSAXHandler::Error,
.fatalError = &DirListSAXHandler::Critical};
#if defined(__GNUC__)
# pragma GCC diagnostic pop
#endif
std::vector<DirListRecord> DirList(const std::string& baseUrl)
{
using namespace std::chrono;

View file

@ -8,10 +8,19 @@
#include <fstream>
#include <sstream>
#if defined(__GNUC__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-copy"
#endif
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/filter/bzip2.hpp>
#if defined(__GNUC__)
# pragma GCC diagnostic pop
#endif
namespace scwx
{
namespace wsr88d

View file

@ -10,10 +10,19 @@
# pragma warning(disable : 4706)
#endif
#if defined(__GNUC__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-copy"
#endif
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/filter/zlib.hpp>
#if defined(__GNUC__)
# pragma GCC diagnostic pop
#endif
#if defined(_MSC_VER)
# pragma warning(pop)
#endif

View file

@ -11,10 +11,19 @@
# pragma warning(disable : 4706)
#endif
#if defined(__GNUC__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-copy"
#endif
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/filter/gzip.hpp>
#if defined(__GNUC__)
# pragma GCC diagnostic pop
#endif
#if defined(_MSC_VER)
# pragma warning(pop)
#endif

View file

@ -5,10 +5,19 @@
#include <istream>
#include <string>
#if defined(__GNUC__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-copy"
#endif
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/filter/bzip2.hpp>
#if defined(__GNUC__)
# pragma GCC diagnostic pop
#endif
namespace scwx
{
namespace wsr88d