Przeglądaj źródła

mark the Error methods as __cold

David Kalnischkies 16 lat temu
rodzic
commit
2a75daa6be
1 zmienionych plików z 6 dodań i 4 usunięć
  1. 6 4
      apt-pkg/contrib/error.h

+ 6 - 4
apt-pkg/contrib/error.h

@@ -53,6 +53,8 @@
     
     
 #include <string>
 #include <string>
 
 
+#include <system.h>
+
 using std::string;
 using std::string;
 
 
 class GlobalError
 class GlobalError
@@ -71,13 +73,13 @@ class GlobalError
    public:
    public:
 
 
    // Call to generate an error from a library call.
    // Call to generate an error from a library call.
-   bool Errno(const char *Function,const char *Description,...) APT_MFORMAT2;
-   bool WarningE(const char *Function,const char *Description,...) APT_MFORMAT2;
+   bool Errno(const char *Function,const char *Description,...) APT_MFORMAT2 __cold;
+   bool WarningE(const char *Function,const char *Description,...) APT_MFORMAT2 __cold;
 
 
    /* A warning should be considered less severe than an error, and may be
    /* A warning should be considered less severe than an error, and may be
       ignored by the client. */
       ignored by the client. */
-   bool Error(const char *Description,...) APT_MFORMAT1;
-   bool Warning(const char *Description,...) APT_MFORMAT1;
+   bool Error(const char *Description,...) APT_MFORMAT1 __cold;
+   bool Warning(const char *Description,...) APT_MFORMAT1 __cold;
 
 
    // Simple accessors
    // Simple accessors
    inline bool PendingError() {return PendingFlag;};
    inline bool PendingError() {return PendingFlag;};