]> git.proxmox.com Git - mirror_libseccomp.git/commitdiff
tests: fix a uninitialized use warning
authorPaul Moore <pmoore@redhat.com>
Thu, 27 Feb 2014 19:12:55 +0000 (14:12 -0500)
committerPaul Moore <pmoore@redhat.com>
Thu, 27 Feb 2014 19:12:55 +0000 (14:12 -0500)
Many, if not all, of the tests had an uninitialized use warning
relating to the use of the libseccomp context variable.

Signed-off-by: Paul Moore <pmoore@redhat.com>
23 files changed:
tests/01-sim-allow.c
tests/02-sim-basic.c
tests/03-sim-basic_chains.c
tests/04-sim-multilevel_chains.c
tests/05-sim-long_jumps.c
tests/06-sim-actions.c
tests/07-sim-db_bug_looping.c
tests/08-sim-subtree_checks.c
tests/09-sim-syscall_priority_pre.c
tests/10-sim-syscall_priority_post.c
tests/12-sim-basic_masked_ops.c
tests/13-basic-attrs.c
tests/14-sim-reset.c
tests/16-sim-arch_basic.c
tests/17-sim-arch_merge.c
tests/18-sim-basic_whitelist.c
tests/19-sim-missing_syscalls.c
tests/20-live-basic_die.c
tests/21-live-basic_allow.c
tests/22-sim-basic_chains_array.c
tests/23-sim-arch_all_basic.c
tests/24-live-arg_allow.c
tests/25-sim-multilevel_chains_adv.c

index 5f4f74df96f3f00099e08c7fd0186db39a324801..947e9d9172125df5b32a45ecfbeeeef4bda80a23 100644 (file)
@@ -29,7 +29,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        struct util_options opts;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_getopt(argc, argv, &opts);
        if (rc < 0)
index b601554b7915dca795041ff1b8a493f95419e237..f902a47b9001633a26a0ed378c845852562d50e9 100644 (file)
@@ -34,7 +34,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        struct util_options opts;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_getopt(argc, argv, &opts);
        if (rc < 0)
index 6e7309b0e8885eebe5da79ed7e81eaf0cac915cc..06a0d15333e1d84150a35ae70d1b497699a3685c 100644 (file)
@@ -29,7 +29,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        struct util_options opts;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_getopt(argc, argv, &opts);
        if (rc < 0)
index aeff58b5b5001dc3f97d499b4697b04ef5c204c6..c504d227c96bd08bc99fbfa4872bbafb378109a3 100644 (file)
@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        struct util_options opts;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_getopt(argc, argv, &opts);
        if (rc < 0)
index 9f24ecd4bf58efa5431210bc37115f8fc8d5de14..0046e076c241ea0d262e034807c43cbcf2231f59 100644 (file)
@@ -31,7 +31,7 @@ int main(int argc, char *argv[])
        int rc;
        int iter;
        struct util_options opts;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_getopt(argc, argv, &opts);
        if (rc < 0)
index 9aff9ef95367a0693c51f9944cbe3bdf38fe4e20..68b037c1ddb30e6372c73092c8eeb3b1f1f2adc2 100644 (file)
@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        struct util_options opts;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_getopt(argc, argv, &opts);
        if (rc < 0)
index 53fb04850c76cacff770cc1ab7da871986d83051..68afbe12414645a1c6ea12fa2790c0e366d201ff 100644 (file)
@@ -29,7 +29,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        struct util_options opts;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_getopt(argc, argv, &opts);
        if (rc < 0)
index 2e6577c74b59859522e9c27a34b33970c92b2d9b..42fce309a7b3a11ddcd9c3046d1402550f427ae7 100644 (file)
@@ -29,7 +29,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        struct util_options opts;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_getopt(argc, argv, &opts);
        if (rc < 0)
index 5de45bf163cb40bbf4d7122b4846811a0ae982c2..c820ac86036ea5436b364942c4a84c6a03dfb346 100644 (file)
@@ -29,7 +29,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        struct util_options opts;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_getopt(argc, argv, &opts);
        if (rc < 0)
index bafa5dde97e9fea797c5217c2b5c1f0412b9d38a..d426e14eb14d897236044c98741d2e60ab577164 100644 (file)
@@ -29,7 +29,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        struct util_options opts;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_getopt(argc, argv, &opts);
        if (rc < 0)
index a6fd939eab786d8eefb273a7464554abd83774f4..29b86d62f1941e36aff85118bb20002cd75567b4 100644 (file)
@@ -29,7 +29,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        struct util_options opts;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_getopt(argc, argv, &opts);
        if (rc < 0)
index 99e8dcb99dcc88f0d88b5c2c4764435be4318d95..091c8ed83fa96d7cbdf8e1dd9c764218c82390ae 100644 (file)
@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        uint32_t val = (uint32_t)(-1);
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        ctx = seccomp_init(SCMP_ACT_ALLOW);
        if (ctx == NULL)
index adcc93421271abb70f1306a17bddbf751a516df0..c87ba13832e1f2eb610395beb7e60c463d6e0f31 100644 (file)
@@ -29,7 +29,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        struct util_options opts;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_getopt(argc, argv, &opts);
        if (rc < 0)
index 5b02cca97f58da0f150c94e29b820b4cb30ea862..69895c34ac4369d8be2818bd01df48144c81e3df 100644 (file)
@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        struct util_options opts;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_getopt(argc, argv, &opts);
        if (rc < 0)
index 61e149003941f45698323d9601339286a71b1acc..46d9601947924a39c41b4a6366245d9ed2ee5511 100644 (file)
@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        struct util_options opts;
-       scmp_filter_ctx ctx_64, ctx_32;
+       scmp_filter_ctx ctx_64 = NULL, ctx_32 = NULL;
 
        rc = util_getopt(argc, argv, &opts);
        if (rc < 0)
index 5deefe72378dde497f969274b8b55813d146a2ed..d312f18e3724b93bf4065452a3091e5e873c52bc 100644 (file)
@@ -29,7 +29,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        struct util_options opts;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_getopt(argc, argv, &opts);
        if (rc < 0)
index 0ccb0f56c52469fe616e32920942bc1461916b42..84c197bfe500355b61411f3fe48b550e28a10908 100644 (file)
@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        struct util_options opts;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_getopt(argc, argv, &opts);
        if (rc < 0)
index b71e0f5cff92549ba3f0b2acd3616a8bc8e10079..1dda6d705e40f89cc323d3901b8601f220a9ee23 100644 (file)
@@ -29,7 +29,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        int action;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_action_parse(argv[1]);
        if (rc == -1)
index 1496cef384caf5832fdd5c9f979306627aa7bab4..dccc6567022dc67eb611219e57e82255c99260c1 100644 (file)
@@ -28,7 +28,7 @@
 int main(int argc, char *argv[])
 {
        int rc;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_action_parse(argv[1]);
        if (rc != SCMP_ACT_ALLOW) {
index 7eba8363a2f652def474fa1fc27205ecd9620591..e3c961376e80593e44cb080738d7221be69e69bb 100644 (file)
@@ -28,7 +28,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        struct util_options opts;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
        struct scmp_arg_cmp arg_cmp;
 
        rc = util_getopt(argc, argv, &opts);
index 1b39914abd6b037875a492353f07997e01703ec1..a8b73667798017823b29189dde843b50d09bc5a1 100644 (file)
@@ -29,7 +29,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        struct util_options opts;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_getopt(argc, argv, &opts);
        if (rc < 0)
index e071ddace0aaeb86804e377408cd6609b25cb2c6..7c50c96bb4e792ad08cf95cc07e473928b21b793 100644 (file)
@@ -34,7 +34,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        int fd;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
        const char buf[] = "testing";
        ssize_t buf_len = strlen(buf);
 
index 68c24ac06c41ec08b4ef0c3140dbb8bf98970e07..0ef7f678f3ab97886760c44b7de9a1ccf09db2ae 100644 (file)
@@ -29,7 +29,7 @@ int main(int argc, char *argv[])
 {
        int rc;
        struct util_options opts;
-       scmp_filter_ctx ctx;
+       scmp_filter_ctx ctx = NULL;
 
        rc = util_getopt(argc, argv, &opts);
        if (rc < 0)