Commit Graph

3 Commits

Author SHA1 Message Date
Nicolas Iooss
6be638327f Cast the return value to non-const void in ebitmap_state_get_cur_polcap
libqpol' hashtable iterator uses non-const data, so
ebitmap_state_get_cur_polcap needs to return a "void *" out of a "const
char *".

This fixes the following gcc warning:

    libqpol/iterator.c: In function 'ebitmap_state_get_cur_polcap':
    libqpol/iterator.c:653:2: warning: return discards 'const' qualifier
    from pointer target type
      return sepol_polcap_getname(es->cur);
      ^

This also adds a warning from "gcc -Wcast-qual" but compiling with this
switch leads to way more warnings.
2014-11-02 13:02:59 -05:00
Nicolas Iooss
ce8323954d Remove unused-by-set variables
This fixes gcc warnings like:

    libqpol/avrule_query.c: In function 'qpol_avrule_get_perm_iter':
    libqpol/avrule_query.c:159:14: warning: variable 'db' set but not used
    [-Wunused-but-set-variable]
      policydb_t *db = NULL;
                  ^
2014-11-02 13:02:58 -05:00
Chris PeBenito
8363f8edf7 Import libqpol from setools3.
Break setools3 dependence. Also fix SWIG wrapper to work with SWIG 2.x.
2014-10-24 21:00:24 -04:00