]> git.sur5r.net Git - openldap/commitdiff
put conditions on i, buf2 and c so we don't get unreferenced variable warnings
authorGary Williams <gwilliams@openldap.org>
Wed, 14 Apr 1999 15:13:10 +0000 (15:13 +0000)
committerGary Williams <gwilliams@openldap.org>
Wed, 14 Apr 1999 15:13:10 +0000 (15:13 +0000)
servers/slapd/monitor.c

index 658db39791a977e6a79b6b1016487a497a4c1900..9c5d5835875b99b97126e235b7326d084a5648e7 100644 (file)
@@ -27,14 +27,18 @@ void
 monitor_info( Connection *conn, Operation *op )
 {
        Entry           *e;
-       char            buf[BUFSIZ], buf2[22];
+       char            buf[BUFSIZ];
        struct berval   val;
        struct berval   *vals[2];
-       int             i, nconns, nwritewaiters, nreadwaiters;
+       int    nconns, nwritewaiters, nreadwaiters;
        struct tm       *ltm;
        char            *p;
+#ifdef LDAP_COUNTERS
+    int        i;
+    char       buf2[22]
        Connection *c;
-       time_t          currenttime;
+#endif
+    time_t             currenttime;
 
        vals[0] = &val;
        vals[1] = NULL;