]> git.saurik.com Git - apt.git/commitdiff
fix -Wmissing-field-initializers warnings
authorDavid Kalnischkies <david@kalnischkies.de>
Tue, 25 Feb 2014 21:22:41 +0000 (22:22 +0100)
committerDavid Kalnischkies <david@kalnischkies.de>
Thu, 13 Mar 2014 12:58:45 +0000 (13:58 +0100)
Reported-By: gcc
Git-Dch: Ignore

apt-pkg/deb/deblistparser.cc
apt-pkg/indexcopy.cc
apt-private/private-show.cc
cmdline/apt-cache.cc
ftparchive/apt-ftparchive.cc
methods/ftp.cc

index 89f3514c942c32ff5bb9cc847637737fdf25ed11..3374865ac77de6094a9d924ccc975fa5f96e331d 100644 (file)
@@ -34,7 +34,7 @@ static debListParser::WordList PrioList[] = {
    {"standard",pkgCache::State::Standard},
    {"optional",pkgCache::State::Optional},
    {"extra",pkgCache::State::Extra},
    {"standard",pkgCache::State::Standard},
    {"optional",pkgCache::State::Optional},
    {"extra",pkgCache::State::Extra},
-   {}};
+   {NULL, 0}};
 
 // ListParser::debListParser - Constructor                             /*{{{*/
 // ---------------------------------------------------------------------
 
 // ListParser::debListParser - Constructor                             /*{{{*/
 // ---------------------------------------------------------------------
@@ -354,7 +354,7 @@ bool debListParser::ParseStatus(pkgCache::PkgIterator &Pkg,
                           {"hold",pkgCache::State::Hold},
                           {"deinstall",pkgCache::State::DeInstall},
                           {"purge",pkgCache::State::Purge},
                           {"hold",pkgCache::State::Hold},
                           {"deinstall",pkgCache::State::DeInstall},
                           {"purge",pkgCache::State::Purge},
-                          {}};
+                          {NULL, 0}};
    if (GrabWord(string(Start,I-Start),WantList,Pkg->SelectedState) == false)
       return _error->Error("Malformed 1st word in the Status line");
 
    if (GrabWord(string(Start,I-Start),WantList,Pkg->SelectedState) == false)
       return _error->Error("Malformed 1st word in the Status line");
 
@@ -370,7 +370,7 @@ bool debListParser::ParseStatus(pkgCache::PkgIterator &Pkg,
                           {"reinstreq",pkgCache::State::ReInstReq},
                           {"hold",pkgCache::State::HoldInst},
                           {"hold-reinstreq",pkgCache::State::HoldReInstReq},
                           {"reinstreq",pkgCache::State::ReInstReq},
                           {"hold",pkgCache::State::HoldInst},
                           {"hold-reinstreq",pkgCache::State::HoldReInstReq},
-                          {}};
+                          {NULL, 0}};
    if (GrabWord(string(Start,I-Start),FlagList,Pkg->InstState) == false)
       return _error->Error("Malformed 2nd word in the Status line");
 
    if (GrabWord(string(Start,I-Start),FlagList,Pkg->InstState) == false)
       return _error->Error("Malformed 2nd word in the Status line");
 
@@ -392,7 +392,7 @@ bool debListParser::ParseStatus(pkgCache::PkgIterator &Pkg,
                             {"triggers-pending",pkgCache::State::TriggersPending},
                             {"post-inst-failed",pkgCache::State::HalfConfigured},
                             {"removal-failed",pkgCache::State::HalfInstalled},
                             {"triggers-pending",pkgCache::State::TriggersPending},
                             {"post-inst-failed",pkgCache::State::HalfConfigured},
                             {"removal-failed",pkgCache::State::HalfInstalled},
-                            {}};
+                            {NULL, 0}};
    if (GrabWord(string(Start,I-Start),StatusList,Pkg->CurrentState) == false)
       return _error->Error("Malformed 3rd word in the Status line");
 
    if (GrabWord(string(Start,I-Start),StatusList,Pkg->CurrentState) == false)
       return _error->Error("Malformed 3rd word in the Status line");
 
index 7694cb1dd44f78a9bd6c454e50d79f6ecddc84d6..9ea2441396208e94d225e0b6c5e3bf5bec758da6 100644 (file)
@@ -436,8 +436,8 @@ bool PackageCopy::GetFile(string &File,unsigned long long &Size)
 /* */
 bool PackageCopy::RewriteEntry(FILE *Target,string File)
 {
 /* */
 bool PackageCopy::RewriteEntry(FILE *Target,string File)
 {
-   TFRewriteData Changes[] = {{"Filename",File.c_str()},
-                              {}};
+   TFRewriteData Changes[] = {{ "Filename", File.c_str(), NULL },
+                              { NULL, NULL, NULL }};
    
    if (TFRewrite(Target,*Section,TFRewritePackageOrder,Changes) == false)
       return false;
    
    if (TFRewrite(Target,*Section,TFRewritePackageOrder,Changes) == false)
       return false;
@@ -482,8 +482,8 @@ bool SourceCopy::GetFile(string &File,unsigned long long &Size)
 bool SourceCopy::RewriteEntry(FILE *Target,string File)
 {
    string Dir(File,0,File.rfind('/'));
 bool SourceCopy::RewriteEntry(FILE *Target,string File)
 {
    string Dir(File,0,File.rfind('/'));
-   TFRewriteData Changes[] = {{"Directory",Dir.c_str()},
-                              {}};
+   TFRewriteData Changes[] = {{ "Directory", Dir.c_str(), NULL },
+                              { NULL, NULL, NULL }};
    
    if (TFRewrite(Target,*Section,TFRewriteSourceOrder,Changes) == false)
       return false;
    
    if (TFRewrite(Target,*Section,TFRewriteSourceOrder,Changes) == false)
       return false;
index 60d9513160ea5ec24b14b838ccb175d3c8807551..9e4bbd35e45fafd09818bf429b9a9f6a95b30cff 100644 (file)
@@ -96,23 +96,23 @@ bool DisplayRecord(pkgCacheFile &CacheFile, pkgCache::VerIterator V,
    // FIXME: add verbose that does not do the removal of the tags?
    TFRewriteData RW[] = {
       // delete, apt-cache show has this info and most users do not care
    // FIXME: add verbose that does not do the removal of the tags?
    TFRewriteData RW[] = {
       // delete, apt-cache show has this info and most users do not care
-      {"MD5sum", 0},
-      {"SHA1", 0},
-      {"SHA256", 0},
-      {"Filename", 0},
-      {"Multi-Arch", 0},
-      {"Architecture", 0},
-      {"Conffiles",0},
+      {"MD5sum", NULL, NULL},
+      {"SHA1", NULL, NULL},
+      {"SHA256", NULL, NULL},
+      {"Filename", NULL, NULL},
+      {"Multi-Arch", NULL, NULL},
+      {"Architecture", NULL, NULL},
+      {"Conffiles", NULL, NULL},
       // we use the translated description
       // we use the translated description
-      {"Description",0},
-      {"Description-md5",0},
+      {"Description", NULL, NULL},
+      {"Description-md5", NULL, NULL},
       // improve
       // improve
-      {"Installed-Size", installed_size.c_str(), 0},
+      {"Installed-Size", installed_size.c_str(), NULL},
       {"Size", package_size.c_str(), "Download-Size"},
       // add
       {"Size", package_size.c_str(), "Download-Size"},
       // add
-      {"APT-Manual-Installed", manual_installed, 0},
-      {"APT-Sources", source_index_file.c_str(), 0},
-      {}
+      {"APT-Manual-Installed", manual_installed, NULL},
+      {"APT-Sources", source_index_file.c_str(), NULL},
+      {NULL, NULL, NULL}
    };
 
    if(TFRewrite(stdout, Tags, NULL, RW) == false)
    };
 
    if(TFRewrite(stdout, Tags, NULL, RW) == false)
index b8892d23d87d07dfb9d59a3e843f31b47e240840..22778eb240207c58a100f08681d1e4e4ece2f241 100644 (file)
@@ -532,7 +532,7 @@ bool DumpAvail(CommandLine &Cmd)
         if ((File->Flags & pkgCache::Flag::NotSource) == pkgCache::Flag::NotSource)
         {
            pkgTagSection Tags;
         if ((File->Flags & pkgCache::Flag::NotSource) == pkgCache::Flag::NotSource)
         {
            pkgTagSection Tags;
-           TFRewriteData RW[] = {{"Status",0},{"Config-Version",0},{}};
+           TFRewriteData RW[] = {{"Status", NULL, NULL},{"Config-Version", NULL, NULL},{NULL, NULL, NULL}};
            const char *Zero = 0;
            if (Tags.Scan(Buffer+Jitter,VF.Size+1) == false ||
                TFRewrite(stdout,Tags,&Zero,RW) == false)
            const char *Zero = 0;
            if (Tags.Scan(Buffer+Jitter,VF.Size+1) == false ||
                TFRewrite(stdout,Tags,&Zero,RW) == false)
index 712f8469a011bc1f0d8fb452b8c22a77d638da4b..d14b68044a3d65d981ab71dbd2b5bd09092dc6bc 100644 (file)
@@ -484,7 +484,7 @@ void LoadTree(vector<PackageMap> &PkgList,Configuration &Setup)
         struct SubstVar const Vars[] = {{"$(DIST)",&Dist},
                                         {"$(SECTION)",&Section},
                                         {"$(ARCH)",&Arch},
         struct SubstVar const Vars[] = {{"$(DIST)",&Dist},
                                         {"$(SECTION)",&Section},
                                         {"$(ARCH)",&Arch},
-                                        {}};
+                                        {NULL, NULL}};
         mode_t const Perms = Block.FindI("FileMode", Permissions);
         bool const LongDesc = Block.FindB("LongDescription", LongDescription);
         TranslationWriter *TransWriter;
         mode_t const Perms = Block.FindI("FileMode", Permissions);
         bool const LongDesc = Block.FindB("LongDescription", LongDescription);
         TranslationWriter *TransWriter;
index 621f48476a2cae301fde471939632a030de047b7..5a87ded1c43d3e0265f9b78bec5b0e766338b826 100644 (file)
@@ -56,9 +56,9 @@ struct AFMap
 };
 
 #ifndef AF_INET6
 };
 
 #ifndef AF_INET6
-struct AFMap AFMap[] = {{AF_INET,1},{}};
+struct AFMap AFMap[] = {{AF_INET,1},{0, 0}};
 #else
 #else
-struct AFMap AFMap[] = {{AF_INET,1},{AF_INET6,2},{}};
+struct AFMap AFMap[] = {{AF_INET,1},{AF_INET6,2},{0, 0}};
 #endif
 
 unsigned long TimeOut = 120;
 #endif
 
 unsigned long TimeOut = 120;