summaryrefslogtreecommitdiff
path: root/test/libapt
diff options
context:
space:
mode:
Diffstat (limited to 'test/libapt')
-rw-r--r--test/libapt/assert.h9
-rw-r--r--test/libapt/compareversion_test.cc6
-rw-r--r--test/libapt/sourcelist_test.cc2
-rw-r--r--test/libapt/tagfile_test.cc2
4 files changed, 14 insertions, 5 deletions
diff --git a/test/libapt/assert.h b/test/libapt/assert.h
index 113c057ed..cde6a6351 100644
--- a/test/libapt/assert.h
+++ b/test/libapt/assert.h
@@ -1,6 +1,11 @@
#include <iostream>
#include <cstdlib>
+#if __GNUC__ >= 4
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wmissing-declarations"
+#endif
+
#define equals(x,y) assertEquals(y, x, __LINE__)
#define equalsNot(x,y) assertEqualsNot(y, x, __LINE__)
@@ -111,3 +116,7 @@ void dumpVector(X vec) {
v != vec.end(); ++v)
std::cout << *v << std::endl;
}
+
+#if __GNUC__ >= 4
+ #pragma GCC diagnostic pop
+#endif
diff --git a/test/libapt/compareversion_test.cc b/test/libapt/compareversion_test.cc
index fdb1d5674..44f8e9d78 100644
--- a/test/libapt/compareversion_test.cc
+++ b/test/libapt/compareversion_test.cc
@@ -31,7 +31,7 @@
using namespace std;
-bool callDPkg(const char *val, const char *ref, const char &op) {
+static bool callDPkg(const char *val, const char *ref, const char &op) {
pid_t Process = ExecFork();
if (Process == 0)
{
@@ -50,7 +50,7 @@ bool callDPkg(const char *val, const char *ref, const char &op) {
return WIFEXITED(Ret) == true && WEXITSTATUS(Ret) == 0;
}
-void assertVersion(int const &CurLine, string const &A, string const &B, int const &Expected) {
+static void assertVersion(int const &CurLine, string const &A, string const &B, int const &Expected) {
int Res = debVS.CmpVersion(A.c_str(), B.c_str());
bool const dpkg = callDPkg(A.c_str(),B.c_str(), Expected);
Res = (Res < 0) ? -1 : ( (Res > 0) ? 1 : Res);
@@ -61,7 +61,7 @@ void assertVersion(int const &CurLine, string const &A, string const &B, int con
_error->Error("DPkg differ with line: %u. '%s' '%s' '%s' == false",CurLine,A.c_str(),((Expected == 1) ? "<<" : ( (Expected == 0) ? "=" : ">>")),B.c_str());
}
-bool RunTest(const char *File)
+static bool RunTest(const char *File)
{
if (FileExists(File) == false)
return _error->Error("Versiontestfile %s doesn't exist!", File);
diff --git a/test/libapt/sourcelist_test.cc b/test/libapt/sourcelist_test.cc
index 0300ce929..e79b6d65e 100644
--- a/test/libapt/sourcelist_test.cc
+++ b/test/libapt/sourcelist_test.cc
@@ -9,7 +9,7 @@
char *tempfile = NULL;
int tempfile_fd = -1;
-void remove_tmpfile(void)
+static void remove_tmpfile(void)
{
if (tempfile_fd > 0)
close(tempfile_fd);
diff --git a/test/libapt/tagfile_test.cc b/test/libapt/tagfile_test.cc
index d12c74c95..effc3244b 100644
--- a/test/libapt/tagfile_test.cc
+++ b/test/libapt/tagfile_test.cc
@@ -9,7 +9,7 @@
char *tempfile = NULL;
int tempfile_fd = -1;
-void remove_tmpfile(void)
+static void remove_tmpfile(void)
{
if (tempfile_fd > 0)
close(tempfile_fd);