Commit ef4e450c authored by Albert Astals Cid's avatar Albert Astals Cid

Enable no-missing-field-initializers

parent efd2205a
......@@ -101,7 +101,7 @@ endif(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
if(CMAKE_COMPILER_IS_GNUCXX)
# set the default compile warnings
set(_warn "-Wall -Wextra -Wpedantic")
set(_warn "${_warn} -Wno-unused-parameter -Wno-missing-field-initializers")
set(_warn "${_warn} -Wno-unused-parameter")
set(_warn "${_warn} -Wcast-align")
set(_warn "${_warn} -Wformat-security")
set(_warn "${_warn} -Wframe-larger-than=65536")
......
/* poppler-structure.cc: glib interface to poppler
*
* Copyright (C) 2013 Igalia S.L.
* Copyright (C) 2018 Albert Astals Cid <aacid@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -242,7 +243,7 @@ ENUM_VALUES (PopplerStructurePlacement, Placement)
{ "Before", POPPLER_STRUCTURE_PLACEMENT_BEFORE },
{ "Start", POPPLER_STRUCTURE_PLACEMENT_START },
{ "End", POPPLER_STRUCTURE_PLACEMENT_END },
{ nullptr }
{ }
};
ENUM_VALUES (PopplerStructureWritingMode, WritingMode)
......@@ -250,7 +251,7 @@ ENUM_VALUES (PopplerStructureWritingMode, WritingMode)
{ "LrTb", POPPLER_STRUCTURE_WRITING_MODE_LR_TB },
{ "RlTb", POPPLER_STRUCTURE_WRITING_MODE_RL_TB },
{ "TbRl", POPPLER_STRUCTURE_WRITING_MODE_TB_RL },
{ nullptr }
{ }
};
ENUM_VALUES (PopplerStructureBorderStyle, BorderStyle)
......@@ -264,7 +265,7 @@ ENUM_VALUES (PopplerStructureBorderStyle, BorderStyle)
{ "Groove", POPPLER_STRUCTURE_BORDER_STYLE_GROOVE },
{ "Inset", POPPLER_STRUCTURE_BORDER_STYLE_INSET },
{ "Outset", POPPLER_STRUCTURE_BORDER_STYLE_OUTSET },
{ nullptr }
{ }
};
ENUM_VALUES (PopplerStructureTextAlign, TextAlign)
......@@ -273,7 +274,7 @@ ENUM_VALUES (PopplerStructureTextAlign, TextAlign)
{ "Center", POPPLER_STRUCTURE_TEXT_ALIGN_CENTER },
{ "End", POPPLER_STRUCTURE_TEXT_ALIGN_END },
{ "Justify", POPPLER_STRUCTURE_TEXT_ALIGN_JUSTIFY },
{ nullptr }
{ }
};
ENUM_VALUES (PopplerStructureBlockAlign, BlockAlign)
......@@ -282,7 +283,7 @@ ENUM_VALUES (PopplerStructureBlockAlign, BlockAlign)
{ "Middle", POPPLER_STRUCTURE_BLOCK_ALIGN_MIDDLE },
{ "After", POPPLER_STRUCTURE_BLOCK_ALIGN_AFTER },
{ "Justify", POPPLER_STRUCTURE_BLOCK_ALIGN_JUSTIFY },
{ nullptr }
{ }
};
ENUM_VALUES (PopplerStructureInlineAlign, InlineAlign)
......@@ -290,7 +291,7 @@ ENUM_VALUES (PopplerStructureInlineAlign, InlineAlign)
{ "Start", POPPLER_STRUCTURE_INLINE_ALIGN_START },
{ "Center", POPPLER_STRUCTURE_INLINE_ALIGN_CENTER },
{ "End", POPPLER_STRUCTURE_INLINE_ALIGN_END },
{ nullptr }
{ }
};
ENUM_VALUES (PopplerStructureTextDecoration, TextDecorationType)
......@@ -299,7 +300,7 @@ ENUM_VALUES (PopplerStructureTextDecoration, TextDecorationType)
{ "Underline", POPPLER_STRUCTURE_TEXT_DECORATION_UNDERLINE },
{ "Overline", POPPLER_STRUCTURE_TEXT_DECORATION_OVERLINE },
{ "LineThrough", POPPLER_STRUCTURE_TEXT_DECORATION_LINETHROUGH },
{ nullptr }
{ }
};
ENUM_VALUES (PopplerStructureRubyAlign, RubyAlign)
......@@ -309,7 +310,7 @@ ENUM_VALUES (PopplerStructureRubyAlign, RubyAlign)
{ "End", POPPLER_STRUCTURE_RUBY_ALIGN_END },
{ "Justify", POPPLER_STRUCTURE_RUBY_ALIGN_JUSTIFY },
{ "Distribute", POPPLER_STRUCTURE_RUBY_ALIGN_DISTRIBUTE },
{ nullptr }
{ }
};
ENUM_VALUES (PopplerStructureRubyPosition, RubyPosition)
......@@ -318,7 +319,7 @@ ENUM_VALUES (PopplerStructureRubyPosition, RubyPosition)
{ "After", POPPLER_STRUCTURE_RUBY_POSITION_AFTER },
{ "Warichu", POPPLER_STRUCTURE_RUBY_POSITION_WARICHU },
{ "Inline", POPPLER_STRUCTURE_RUBY_POSITION_INLINE },
{ nullptr }
{ }
};
ENUM_VALUES (PopplerStructureGlyphOrientation, GlyphOrientationVertical)
......@@ -330,7 +331,7 @@ ENUM_VALUES (PopplerStructureGlyphOrientation, GlyphOrientationVertical)
{ "360", POPPLER_STRUCTURE_GLYPH_ORIENTATION_0 },
{ "-90", POPPLER_STRUCTURE_GLYPH_ORIENTATION_270 },
{ "-180", POPPLER_STRUCTURE_GLYPH_ORIENTATION_180 },
{ nullptr }
{ }
};
ENUM_VALUES (PopplerStructureListNumbering, ListNumbering)
......@@ -344,7 +345,7 @@ ENUM_VALUES (PopplerStructureListNumbering, ListNumbering)
{ "LowerRoman", POPPLER_STRUCTURE_LIST_NUMBERING_LOWER_ROMAN },
{ "UpperAlpha", POPPLER_STRUCTURE_LIST_NUMBERING_UPPER_ALPHA },
{ "LowerAlpha", POPPLER_STRUCTURE_LIST_NUMBERING_LOWER_ALPHA },
{ nullptr }
{ }
};
ENUM_VALUES (PopplerStructureFormRole, Role)
......@@ -353,7 +354,7 @@ ENUM_VALUES (PopplerStructureFormRole, Role)
{ "cb", POPPLER_STRUCTURE_FORM_ROLE_CHECKBOX },
{ "pb", POPPLER_STRUCTURE_FORM_ROLE_PUSH_BUTTON },
{ "tv", POPPLER_STRUCTURE_FORM_ROLE_TEXT_VALUE },
{ nullptr }
{ }
};
ENUM_VALUES (PopplerStructureFormState, checked)
......@@ -361,7 +362,7 @@ ENUM_VALUES (PopplerStructureFormState, checked)
{ "on", POPPLER_STRUCTURE_FORM_STATE_ON },
{ "off", POPPLER_STRUCTURE_FORM_STATE_OFF },
{ "neutral", POPPLER_STRUCTURE_FORM_STATE_NEUTRAL },
{ nullptr }
{ }
};
ENUM_VALUES (PopplerStructureTableScope, Scope)
......@@ -369,7 +370,7 @@ ENUM_VALUES (PopplerStructureTableScope, Scope)
{ "Row", POPPLER_STRUCTURE_TABLE_SCOPE_ROW },
{ "Column", POPPLER_STRUCTURE_TABLE_SCOPE_COLUMN },
{ "Both", POPPLER_STRUCTURE_TABLE_SCOPE_BOTH },
{ nullptr }
{ }
};
#undef ENUM_VALUES
......
......@@ -13,7 +13,7 @@
// All changes made under the Poppler project to this file are licensed
// under GPL version 2 or later
//
// Copyright (C) 2005, 2006, 2008-2010, 2012, 2014, 2015, 2017 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2005, 2006, 2008-2010, 2012, 2014, 2015, 2017, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com>
// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
// Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org>
......@@ -2226,7 +2226,7 @@ int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
"Adobe-Korea1-UCS2",
adobe_korea1_cmaps,
},
{nullptr, nullptr, nullptr, nullptr}
{nullptr, nullptr, nullptr, nullptr, nullptr}
};
Unicode *humap = nullptr;
Unicode *vumap = nullptr;
......
......@@ -3820,16 +3820,16 @@ JBIG2Bitmap *JBIG2Stream::readGenericRefinementRegion(int w, int h,
JBIG2Bitmap *bitmap;
GBool ltp;
Guint ltpCX, cx, cx0, cx2, cx3, cx4, tpgrCX0, tpgrCX1, tpgrCX2;
JBIG2BitmapPtr cxPtr0 = {nullptr};
JBIG2BitmapPtr cxPtr1 = {nullptr};
JBIG2BitmapPtr cxPtr2 = {nullptr};
JBIG2BitmapPtr cxPtr3 = {nullptr};
JBIG2BitmapPtr cxPtr4 = {nullptr};
JBIG2BitmapPtr cxPtr5 = {nullptr};
JBIG2BitmapPtr cxPtr6 = {nullptr};
JBIG2BitmapPtr tpgrCXPtr0 = {nullptr};
JBIG2BitmapPtr tpgrCXPtr1 = {nullptr};
JBIG2BitmapPtr tpgrCXPtr2 = {nullptr};
JBIG2BitmapPtr cxPtr0 = {nullptr, 0, 0};
JBIG2BitmapPtr cxPtr1 = {nullptr, 0, 0};
JBIG2BitmapPtr cxPtr2 = {nullptr, 0, 0};
JBIG2BitmapPtr cxPtr3 = {nullptr, 0, 0};
JBIG2BitmapPtr cxPtr4 = {nullptr, 0, 0};
JBIG2BitmapPtr cxPtr5 = {nullptr, 0, 0};
JBIG2BitmapPtr cxPtr6 = {nullptr, 0, 0};
JBIG2BitmapPtr tpgrCXPtr0 = {nullptr, 0, 0};
JBIG2BitmapPtr tpgrCXPtr1 = {nullptr, 0, 0};
JBIG2BitmapPtr tpgrCXPtr2 = {nullptr, 0, 0};
int x, y, pix;
if (!refBitmap) {
......
......@@ -30,7 +30,7 @@ static const GOptionEntry options[] = {
{ "splash", 's', 0, G_OPTION_ARG_NONE, &splash_output, "Splash Output Device", nullptr},
{ "page", 'p', 0, G_OPTION_ARG_INT, &page, "Page number", "PAGE" },
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &file_arguments, nullptr, "PDF-FILES…" },
{ nullptr }
{ }
};
static GList *view_list = nullptr;
......
......@@ -41,7 +41,7 @@ static const ArgDesc argDesc[] = {
"print usage information"},
{"-?", argFlag, &printHelp, 0,
"print usage information"},
{nullptr}
{ }
};
int main (int argc, char *argv[])
......
......@@ -16,6 +16,7 @@
// Copyright (C) 2011 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright (C) 2013 Yury G. Kudryashov <urkud.urkud@gmail.com>
// Copyright (C) 2014, 2017 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org>
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
......@@ -77,7 +78,7 @@ static ArgDesc argDesc[] = {
"print usage information"},
{"-?", argFlag, &printHelp, 0,
"print usage information"},
{nullptr}
{ }
};
int main(int argc, char *argv[]) {
......
......@@ -14,7 +14,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2006 Dominic Lachowicz <cinamod@hotmail.com>
// Copyright (C) 2007-2008, 2010 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2007-2008, 2010, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2010 Hib Eris <hib@hiberis.nl>
// Copyright (C) 2012, 2017 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2013 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
......@@ -85,7 +85,7 @@ static const ArgDesc argDesc[] = {
"print usage information"},
{"-?", argFlag, &printHelp, 0,
"print usage information"},
{nullptr}
{}
};
int main(int argc, char *argv[]) {
......
......@@ -15,7 +15,7 @@
// All changes made under the Poppler project to this file are licensed
// under GPL version 2 or later
//
// Copyright (C) 2007-2008, 2010 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2007-2008, 2010, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2010 Hib Eris <hib@hiberis.nl>
// Copyright (C) 2010 Jakob Voss <jakob.voss@gbv.de>
// Copyright (C) 2012, 2013, 2017 Adrian Johnson <ajohnson@redneon.com>
......@@ -109,7 +109,7 @@ static const ArgDesc argDesc[] = {
"print usage information"},
{"-?", argFlag, &printHelp, 0,
"print usage information"},
{nullptr}
{}
};
int main(int argc, char *argv[]) {
......
......@@ -15,7 +15,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2006 Dom Lachowicz <cinamod@hotmail.com>
// Copyright (C) 2007-2010, 2012, 2016, 2017 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2007-2010, 2012, 2016-2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2010 Hib Eris <hib@hiberis.nl>
// Copyright (C) 2011 Vittal Aithal <vittal.aithal@cognidox.com>
// Copyright (C) 2012, 2013, 2016, 2017 Adrian Johnson <ajohnson@redneon.com>
......@@ -120,7 +120,7 @@ static const ArgDesc argDesc[] = {
"print usage information"},
{"-?", argFlag, &printHelp, 0,
"print usage information"},
{nullptr}
{}
};
static void printInfoString(Dict *infoDict, const char *key, const char *text,
......
......@@ -5,7 +5,7 @@
// This file is licensed under the GPLv2 or later
//
// Copyright (C) 2011, 2012, 2015 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2012-2014, 2017 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2012-2014, 2017, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2013, 2016 Pino Toscano <pino@kde.org>
// Copyright (C) 2013 Daniel Kahn Gillmor <dkg@fifthhorseman.net>
// Copyright (C) 2013 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
......@@ -47,7 +47,7 @@ static const ArgDesc argDesc[] = {
"print usage information"},
{"-?", argFlag, &printHelp, 0,
"print usage information"},
{nullptr}
{}
};
static bool extractPages (const char *srcFileName, const char *destFileName) {
......
......@@ -6,7 +6,7 @@
//
// Copyright 2015 André Guerreiro <aguerreiro1985@gmail.com>
// Copyright 2015 André Esser <bepandre@hotmail.com>
// Copyright 2015, 2017 Albert Astals Cid <aacid@kde.org>
// Copyright 2015, 2017, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright 2016 Markus Kilås <digital@markuspage.com>
// Copyright 2017 Hans-Ulrich Jüttner <huj@froreich-bioscientia.de>
// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com>
......@@ -104,7 +104,7 @@ static const ArgDesc argDesc[] = {
"print usage information"},
{"-?", argFlag, &printHelp, 0,
"print usage information"},
{nullptr}
{}
};
......
......@@ -18,7 +18,7 @@
// Copyright (C) 2009 Michael K. Johnson <a1237@danlj.org>
// Copyright (C) 2009 Shen Liang <shenzhuxi@gmail.com>
// Copyright (C) 2009 Stefan Thomas <thomas@eload24.com>
// Copyright (C) 2009, 2010, 2017 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009, 2010, 2017, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2010, 2011-2017 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2010, 2014 Hib Eris <hib@hiberis.nl>
// Copyright (C) 2010 Jonathan Liu <net147@gmail.com>
......@@ -269,7 +269,7 @@ static const ArgDesc argDesc[] = {
"print usage information"},
{"-?", argFlag, &printHelp, 0,
"print usage information"},
{nullptr}
{}
};
......
......@@ -13,7 +13,7 @@
// All changes made under the Poppler project to this file are licensed
// under GPL version 2 or later
//
// Copyright (C) 2007-2008, 2010, 2012, 2015-2017 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2007-2008, 2010, 2012, 2015-2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2010 Hib Eris <hib@hiberis.nl>
// Copyright (C) 2010 Mike Slegeir <tehpola@yahoo.com>
// Copyright (C) 2010, 2013 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
......@@ -149,7 +149,7 @@ static const ArgDesc argDesc[] = {
"word break threshold (default 10 percent)"},
{"-fontfullname", argFlag, &fontFullName, 0,
"outputs font full name"},
{nullptr}
{}
};
#ifdef HAVE_SPLASH
......
......@@ -18,7 +18,7 @@
// Copyright (C) 2009 Michael K. Johnson <a1237@danlj.org>
// Copyright (C) 2009 Shen Liang <shenzhuxi@gmail.com>
// Copyright (C) 2009 Stefan Thomas <thomas@eload24.com>
// Copyright (C) 2009-2011, 2015 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009-2011, 2015, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2010, 2012, 2017 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2010 Hib Eris <hib@hiberis.nl>
// Copyright (C) 2010 Jonathan Liu <net147@gmail.com>
......@@ -209,7 +209,7 @@ static const ArgDesc argDesc[] = {
"print usage information"},
{"-?", argFlag, &printHelp, 0,
"print usage information"},
{nullptr}
{}
};
static GBool parseJpegOptions()
......
......@@ -16,7 +16,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
// Copyright (C) 2007-2008, 2010, 2015, 2017 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2007-2008, 2010, 2015, 2017, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009 Till Kamppeter <till.kamppeter@gmail.com>
// Copyright (C) 2009 Sanjoy Mahajan <sanjoy@mit.edu>
// Copyright (C) 2009, 2011, 2012, 2014-2016 William Bader <williambader@hotmail.com>
......@@ -202,7 +202,7 @@ static const ArgDesc argDesc[] = {
"print usage information"},
{"-?", argFlag, &printHelp, 0,
"print usage information"},
{nullptr}
{}
};
int main(int argc, char *argv[]) {
......
......@@ -16,7 +16,7 @@
// under GPL version 2 or later
//
// Copyright (C) 2006 Dominic Lachowicz <cinamod@hotmail.com>
// Copyright (C) 2007-2008, 2010, 2011, 2017 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2007-2008, 2010, 2011, 2017, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009 Jan Jockusch <jan@jockusch.de>
// Copyright (C) 2010, 2013 Hib Eris <hib@hiberis.nl>
// Copyright (C) 2010 Kenneth Berland <ken@hero.com>
......@@ -142,7 +142,7 @@ static const ArgDesc argDesc[] = {
"print usage information"},
{"-?", argFlag, &printHelp, 0,
"print usage information"},
{nullptr}
{}
};
static std::string myStringReplace(const std::string &inString, const std::string &oldToken, const std::string &newToken) {
......
......@@ -7,7 +7,7 @@
// Copyright (C) 2011-2015, 2017 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2012 Arseny Solokha <asolokha@gmx.com>
// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
// Copyright (C) 2012, 2014, 2017 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2012, 2014, 2017, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com>
// Copyright (C) 2013 Hib Eris <hib@hiberis.nl>
// Copyright (C) 2015 Arthur Stavisky <vovodroid@gmail.com>
......@@ -35,7 +35,7 @@ static const ArgDesc argDesc[] = {
"print usage information"},
{"-?", argFlag, &printHelp, 0,
"print usage information"},
{nullptr}
{ }
};
static void doMergeNameTree(PDFDoc *doc, XRef *srcXRef, XRef *countRef, int oldRefNum, int newRefNum, Dict *srcNameTree, Dict *mergeNameTree, int numOffset) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment