Browse Source

Ticket 571 (dup 47361) - Empty control list causes LDAP protocol error is thrown

covscan Defect type:  Compiler Warnings
2. 389-ds-base-1.3.1.6/ldap/servers/slapd/control.c:364:25:
   warning - format '%d' expects argument of type 'int',
   but argument 4 has type 'PRUint64' [-Wformat=]
Introduced by commit d695afb6a637432e880296d8552f466981c0796c
Fix: Replaced %d with % NSPRIu64

Reviewed by [email protected] (Thank you, Rich!!)
Noriko Hosoi 11 years ago
parent
commit
383db4a27c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      ldap/servers/slapd/control.c

+ 2 - 2
ldap/servers/slapd/control.c

@@ -366,8 +366,8 @@ get_ldapmessage_controls_ext(
                 slapi_pblock_set(pb, SLAPI_REQCONTROLS, NULL);
                 slapi_pblock_set(pb, SLAPI_MANAGEDSAIT, &ctrl_not_found);
                 slapi_pblock_set(pb, SLAPI_PWPOLICY, &ctrl_not_found);
-                slapi_log_error(SLAPI_LOG_CONNS, "connection", "Warning: conn=%d op=%d contains an empty list of controls\n",
-                        (int)pb->pb_conn->c_connid, pb->pb_op->o_opid);
+                slapi_log_error(SLAPI_LOG_CONNS, "connection", "Warning: conn=%" NSPRIu64 " op=%d contains an empty list of controls\n",
+                        (long long unsigned int)pb->pb_conn->c_connid, pb->pb_op->o_opid);
         } else {
                 if ((tag != LBER_END_OF_SEQORSET) && (len != -1)) {
                         goto free_and_return;