Changeset 3e16fb8


Ignore:
Timestamp:
2014-04-20T16:59:23Z (10 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
6a6d7d8
Parents:
b4008a5
Message:

Fix compiler warnings in testsuite/.

Location:
tests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • tests/check.c

    rb4008a5 r3e16fb8  
    44#include <check.h>
    55#include <locale.h>
     6#include <sys/time.h>
    67#include "bitlbee.h"
    78#include "testsuite.h"
     
    8283                { NULL }
    8384        };
    84         int i;
    8585
    8686        pc = g_option_context_new("");
  • tests/check_help.c

    rb4008a5 r3e16fb8  
    1212        fail_if(r == NULL);
    1313        fail_if(r != h);
    14        
     14
    1515        help_free(&h);
    1616        fail_if(h != NULL);
     
    2121        r = help_init(&h, "/dev/null");
    2222        fail_unless(help_get(&h, "nonexistent") == NULL);
     23        fail_if(r == NULL);
    2324END_TEST
    2425
  • tests/check_md5.c

    rb4008a5 r3e16fb8  
    3737                tcase_fn_start (tests[i].str, __FILE__, __LINE__);
    3838                md5_state_t state;
    39                 int di;
    4039
    4140                md5_init(&state);
  • tests/check_set.c

    rb4008a5 r3e16fb8  
    2626
    2727START_TEST(test_set_find_unknown)
    28         set_t *s = NULL, *t;
     28        set_t *s = NULL;
    2929        fail_unless (set_find(&s, "foo") == NULL);
    3030END_TEST
     
    6969START_TEST(test_set_get_str_value)
    7070        void *data = "data";
    71         set_t *s = NULL, *t;
    72         t = set_add(&s, "name", "default", NULL, data);
     71        set_t *s = NULL;
     72        set_add(&s, "name", "default", NULL, data);
    7373        set_setstr(&s, "name", "foo");
    7474        fail_unless(strcmp(set_getstr(&s, "name"), "foo") == 0);
     
    8282START_TEST(test_setint)
    8383        void *data = "data";
    84         set_t *s = NULL, *t;
    85         t = set_add(&s, "name", "10", NULL, data);
     84        set_t *s = NULL;
     85        set_add(&s, "name", "10", NULL, data);
    8686        set_setint(&s, "name", 3);
    8787        fail_unless(set_getint(&s, "name") == 3);
     
    9090START_TEST(test_setstr)
    9191        void *data = "data";
    92         set_t *s = NULL, *t;
    93         t = set_add(&s, "name", "foo", NULL, data);
     92        set_t *s = NULL;
     93        set_add(&s, "name", "foo", NULL, data);
    9494        set_setstr(&s, "name", "bloe");
    9595        fail_unless(strcmp(set_getstr(&s, "name"), "bloe") == 0);
Note: See TracChangeset for help on using the changeset viewer.