]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cacheset.h
make errors more consistent
[apt.git] / apt-pkg / cacheset.h
index 16a3daa423cfcb8101c85c4712aee14d302da44c..36f41c34dc60eab35630fceedb9c03856be34788 100644 (file)
@@ -118,7 +118,16 @@ public:
                inline const char *Name() const {return getPkg().Name(); }
                inline std::string FullName(bool const Pretty) const { return getPkg().FullName(Pretty); }
                inline std::string FullName() const { return getPkg().FullName(); }
-               inline const char *Section() const {return getPkg().Section(); }
+               APT_DEPRECATED inline const char *Section() const {
+#if __GNUC__ >= 4
+       #pragma GCC diagnostic push
+       #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+          return getPkg().Section();
+#if __GNUC__ >= 4
+       #pragma GCC diagnostic pop
+#endif
+               }
                inline bool Purge() const {return getPkg().Purge(); }
                inline const char *Arch() const {return getPkg().Arch(); }
                inline pkgCache::GrpIterator Group() const { return getPkg().Group(); }
@@ -584,7 +593,7 @@ public:                                                                     /*{{{*/
 
        static VersionContainer FromString(pkgCacheFile &Cache, std::string const &pkg,
                        Version const &fallback, CacheSetHelper &helper,
-                       bool const onlyFromName = false) {
+                                           bool const /*onlyFromName = false*/) {
                VersionContainer vercon;
                VersionContainerInterface::FromString(&vercon, Cache, pkg, fallback, helper);
                return vercon;