From c96763215dddce8fbd6f785b9c841b5d97458d41 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 5 Apr 2011 14:04:16 +0200 Subject: [PATCH] Avoid set-but-not-used warning/error in a test Closes GH-20. --- test/suites/api/test_load.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/suites/api/test_load.c b/test/suites/api/test_load.c index b1679a3..ecb46d8 100644 --- a/test/suites/api/test_load.c +++ b/test/suites/api/test_load.c @@ -15,6 +15,8 @@ int main() json_error_t error; json = json_load_file("/path/to/nonexistent/file.json", 0, &error); + if(json) + fail("json_load_file returned non-NULL for a nonexistent file"); if(error.line != -1) fail("json_load_file returned an invalid line number"); if(strcmp(error.text, "unable to open /path/to/nonexistent/file.json: No such file or directory") != 0)