summaryrefslogtreecommitdiff
path: root/test/libapt/cdrom_test.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-11-05 18:14:04 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-11-08 14:26:00 +0100
commit4234d90d58b684824bf217d9226c50b7c9583346 (patch)
tree90b43b9294f9e3c686ee825a838fc1ce63c11cbb /test/libapt/cdrom_test.cc
parentc355ea30383486e74635cd0248d3b53ed9759c39 (diff)
tests: silence clang on uninitilized variables
The testcases have far worse problems if these ever end up being NULL and/or are not given a value by the method called, but clang is right to warn about it, just that we don't want to fix it in testcases… Git-Dch: Ignore
Diffstat (limited to 'test/libapt/cdrom_test.cc')
-rw-r--r--test/libapt/cdrom_test.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/libapt/cdrom_test.cc b/test/libapt/cdrom_test.cc
index 5cf3b353c..7257eaf1b 100644
--- a/test/libapt/cdrom_test.cc
+++ b/test/libapt/cdrom_test.cc
@@ -109,6 +109,7 @@ TEST(CDROMTest, FindMountPointForDevice)
EXPECT_EQ("/boot/efi", FindMountPointForDevice("/dev/sda1"));
EXPECT_EQ("/tmp", FindMountPointForDevice("tmpfs"));
- unlink(tempfile);
+ if (tempfile != NULL)
+ unlink(tempfile);
free(tempfile);
}