]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:torture/ldap/ldap_sort - Add some casts to suppress warnings
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Sat, 17 Oct 2009 20:34:00 +0000 (22:34 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 1 Dec 2009 05:48:14 +0000 (16:48 +1100)
source4/torture/ldap/ldap_sort.c

index 03fcfd8482dffe511e6163cbda86676c5e47b22d..4c8145cc835df12557a990de5be829834b1d2eef 100644 (file)
@@ -46,13 +46,13 @@ bool torture_ldap_sort(struct torture_context *torture)
        struct ldb_server_sort_control **control;
        struct ldb_request *req;
        struct ldb_result *ctx;
-       struct ldb_valprev = NULL;
+       struct ldb_val *prev = NULL;
        const char *prev_txt = NULL;
        int prev_len = 0;
-       struct ldb_valcur = NULL;
+       struct ldb_val *cur = NULL;
        const char *cur_txt = NULL;
        int cur_len = 0;
-       struct ldb_dndn;
+       struct ldb_dn *dn;
                 
                 
        /* TALLOC_CTX* ctx;*/
@@ -103,10 +103,10 @@ bool torture_ldap_sort(struct torture_context *torture)
                        if (prev != NULL)
                        {
                                /* Do only the ascii case right now ... */
-                               cur_txt=cur->data;
-                               cur_len=cur->length;
-                               prev_txt=prev->data;
-                               prev_len=prev->length;
+                               cur_txt = (const char *) cur->data;
+                               cur_len = cur->length;
+                               prev_txt = (const char *) prev->data;
+                               prev_len = prev->length;
                                /* Remove leading whitespace as the sort function do so ... */
                                while ( cur_txt[0] == cur_txt[1] ) { cur_txt++; cur_len--;}
                                while ( prev_txt[0] == prev_txt[1] ) { prev_txt++; prev_len--;}