added option to compile with absolutely _no_ debugging macros / info.
authorLuke Leighton <lkcl@samba.org>
Mon, 10 Apr 2000 06:26:58 +0000 (06:26 +0000)
committerLuke Leighton <lkcl@samba.org>
Mon, 10 Apr 2000 06:26:58 +0000 (06:26 +0000)
found some unused variables, already.

source/include/debug.h
source/rpc_client/cli_pipe.c
source/rpc_client/msrpc_samr.c

index ad7c1a8645d178d5fc6bbfd658bdcd828466491a..73571577c1b15a0add1a5a23b7c9da2477e14bb5 100644 (file)
@@ -84,6 +84,17 @@ BOOL dbgtext();
  *               Usage:
  *                 DEBUGADD( 2, ("Some additional text.\n") );
  */
+
+#ifdef NO_DEBUG_REPORTING
+
+#define DEBUGLVL( level ) (True)
+
+#define DEBUG( level , body ) (void)(False)
+
+#define DEBUGADD( level , body ) (void)(False)
+
+#else
+
 #define DEBUGLVL( level ) \
   ( (DEBUGLEVEL >= (level)) \
    && dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) ) )
@@ -96,6 +107,8 @@ BOOL dbgtext();
 #define DEBUGADD( level, body ) \
   (void)( (DEBUGLEVEL >= (level)) && (dbgtext body) )
 
+#endif
+
 /* -------------------------------------------------------------------------- **
  * These are the tokens returned by dbg_char2token().
  */
index 71c5cd216dfc079a42e00ae48cef225a8e58da6d..246b8154ffea8391a8ed238656506dd86877e523 100644 (file)
@@ -532,7 +532,6 @@ BOOL cli_send_and_rcv_pdu_trans(struct cli_connection *con,
                                int max_send_pdu)
 {
        int len;
-       uint16 cmd = 0x0026;
        cli_auth_fns *auth = cli_conn_get_authfns(con);
 
        BOOL first = True;
@@ -540,7 +539,7 @@ BOOL cli_send_and_rcv_pdu_trans(struct cli_connection *con,
        RPC_HDR rhdr;
        size_t data_len = data->data_size;
        int max_data_len = MAX(data_len, 2048);
-       DEBUG(5, ("cli_send_and_rcv_pdu_trans: cmd:%x fnum:%x\n", cmd, fnum));
+       DEBUG(5, ("cli_send_and_rcv_pdu_trans: fnum:%x\n", fnum));
 
        DEBUG(10, ("cli_send_and_rcv_pdu_trans: len: %d\n", data_len));
 
@@ -614,7 +613,6 @@ BOOL cli_send_and_rcv_pdu_rw(struct cli_connection *con,
 {
        int len;
        int data_offset = 0;
-       uint16 cmd = 0x0026;
        cli_auth_fns *auth = cli_conn_get_authfns(con);
 
        BOOL first = True;
@@ -625,7 +623,7 @@ BOOL cli_send_and_rcv_pdu_rw(struct cli_connection *con,
        char *d = NULL;
        size_t data_left = data->data_size;
        size_t data_len = data->data_size;
-       DEBUG(5, ("cli_send_and_rcv_pdu_rw: cmd:%x fnum:%x\n", cmd, fnum));
+       DEBUG(5, ("cli_send_and_rcv_pdu_rw: fnum:%x\n", fnum));
 
        while (data_offset < data_len)
        {
index ca3f6b9eacdce734e6e57ba721f6b6afe1cee99e..874baea8a56b70893f11e5aa91efc89ba1fa83b9 100644 (file)
@@ -568,7 +568,6 @@ int msrpc_sam_enum_users( const char* srv_name,
        BOOL res1 = True;
        BOOL res2 = True;
        uint32 start_idx = 0x0;
-       uint16 unk_0 = 0x0;
        uint16 acb_mask = 0;
        uint16 unk_1 = 0x0;
        uint32 ace_perms = 0x304; /* access control permissions */
@@ -582,8 +581,8 @@ int msrpc_sam_enum_users( const char* srv_name,
 
        string_to_sid(&sid_1_5_20, "S-1-5-32");
 
-       DEBUG(5,("Number of entries:%d unk_0:%04x acb_mask:%04x unk_1:%04x\n",
-                 start_idx, unk_0, acb_mask, unk_1));
+       DEBUG(5,("Number of entries:%d :%04x unk_1:%04x\n",
+                 start_idx, acb_mask, unk_1));
 
        /* establish a connection. */
        res = res ? samr_connect( srv_name, SEC_RIGHTS_MAXIMUM_ALLOWED,