mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-27 12:06:21 +00:00
tests: remove cflag -w and fix warnings
The flag hides errors. But we want unit tests to be correct in order to reveal errors in the main code. The patch removes tests_unittests_unittests_CFLAGS which makes autotools use AM_CFLAGS instead. Therefore, unit tests are built with flags derived from configure.ac.
This commit is contained in:
@@ -62,12 +62,14 @@ void cmd_bookmark_shows_usage_when_no_args(void **state)
|
||||
assert_true(result);
|
||||
}
|
||||
|
||||
/*
|
||||
static void _free_bookmark(Bookmark *bookmark)
|
||||
{
|
||||
free(bookmark->barejid);
|
||||
free(bookmark->nick);
|
||||
free(bookmark);
|
||||
}
|
||||
*/
|
||||
|
||||
static gboolean
|
||||
_cmp_bookmark(Bookmark *bm1, Bookmark *bm2)
|
||||
@@ -187,7 +189,7 @@ void cmd_bookmark_uses_roomjid_in_room(void **state)
|
||||
|
||||
expect_win_println("Bookmark added for room@conf.server.");
|
||||
|
||||
gboolean result = cmd_bookmark(&muc_win, CMD_BOOKMARK, args);
|
||||
gboolean result = cmd_bookmark(&muc_win.window, CMD_BOOKMARK, args);
|
||||
assert_true(result);
|
||||
|
||||
muc_close();
|
||||
@@ -213,7 +215,7 @@ void cmd_bookmark_add_uses_roomjid_in_room(void **state)
|
||||
|
||||
expect_win_println("Bookmark added for room@conf.server.");
|
||||
|
||||
gboolean result = cmd_bookmark(&muc_win, CMD_BOOKMARK, args);
|
||||
gboolean result = cmd_bookmark(&muc_win.window, CMD_BOOKMARK, args);
|
||||
assert_true(result);
|
||||
|
||||
muc_close();
|
||||
@@ -240,7 +242,7 @@ void cmd_bookmark_add_uses_supplied_jid_in_room(void **state)
|
||||
|
||||
expect_cons_show("Bookmark added for room1@conf.server.");
|
||||
|
||||
gboolean result = cmd_bookmark(&muc_win, CMD_BOOKMARK, args);
|
||||
gboolean result = cmd_bookmark(&muc_win.window, CMD_BOOKMARK, args);
|
||||
assert_true(result);
|
||||
|
||||
muc_close();
|
||||
@@ -364,7 +366,7 @@ void cmd_bookmark_remove_uses_roomjid_in_room(void **state)
|
||||
|
||||
expect_win_println("Bookmark removed for room@conf.server.");
|
||||
|
||||
gboolean result = cmd_bookmark(&muc_win, CMD_BOOKMARK, args);
|
||||
gboolean result = cmd_bookmark(&muc_win.window, CMD_BOOKMARK, args);
|
||||
assert_true(result);
|
||||
|
||||
muc_close();
|
||||
@@ -388,7 +390,7 @@ void cmd_bookmark_remove_uses_supplied_jid_in_room(void **state)
|
||||
|
||||
expect_cons_show("Bookmark removed for room1@conf.server.");
|
||||
|
||||
gboolean result = cmd_bookmark(&muc_win, CMD_BOOKMARK, args);
|
||||
gboolean result = cmd_bookmark(&muc_win.window, CMD_BOOKMARK, args);
|
||||
assert_true(result);
|
||||
|
||||
muc_close();
|
||||
|
||||
Reference in New Issue
Block a user