liquid_feedback_frontend

changeset 1638:39bf0af7f5e3

Silence compiler warnings regarding discarded const qualifier in mldap library
author jbe
date Tue Feb 09 16:59:01 2021 +0100 (2021-02-09)
parents 6fb549c147cb
children 0f42dbf74270
files lib/mldap/mldap.c
line diff
     1.1 --- a/lib/mldap/mldap.c	Tue Feb 09 00:31:34 2021 +0100
     1.2 +++ b/lib/mldap/mldap.c	Tue Feb 09 16:59:01 2021 +0100
     1.3 @@ -202,7 +202,8 @@
     1.4    // extract arguments:
     1.5    uri = mldap_get_named_string_arg(L, 1, "uri", true);
     1.6    who = mldap_get_named_string_arg(L, 1, "who", false);
     1.7 -  cred.bv_val = mldap_get_named_string_arg(L, 1, "password", false);
     1.8 +  cred.bv_val = (char *)mldap_get_named_string_arg(L, 1, "password", false);
     1.9 +  // use (char *) cast to suppress compiler warning (should be const anyway)
    1.10    if (cred.bv_val) cred.bv_len = strlen(cred.bv_val);
    1.11    else cred.bv_len = 0;
    1.12    timeout_float = mldap_get_named_number_arg(L, 1, "timeout", false, -1);
    1.13 @@ -308,7 +309,7 @@
    1.14    int scope;                 // integer representing the scope
    1.15    const char *filter;        // C string for "filter" argument
    1.16    size_t nattrs;             // number of attributes in "attrs" argument
    1.17 -  char **attrs;              // C string array of "attrs" argument
    1.18 +  const char **attrs;        // C string array of "attrs" argument
    1.19    size_t attr_idx;           // index variable for building the C string array of "attrs"
    1.20    int ldap_error;            // LDAP error code (as returned by libldap calls)
    1.21    LDAP **ldp_ptr;            // pointer to a pointer to the OpenLDAP structure representing the connection
    1.22 @@ -360,7 +361,8 @@
    1.23      base,      // DN of the entry at which to start the search
    1.24      scope,     // scope of the search
    1.25      filter,    // string representation of the filter to apply in the search
    1.26 -    attrs,     // array of attribute descriptions (array of strings)
    1.27 +    (char **)attrs,  // array of attribute descriptions (array of strings)
    1.28 +               // cast to suppress compiler warning (should be const anyway)
    1.29      0,         // do not only request attribute descriptions but also values
    1.30      NULL,      // no server controls
    1.31      NULL,      // no client controls

Impressum / About Us