Skip to content

Commit

Permalink
Fix commented out code warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolf3s committed Dec 18, 2023
1 parent 7d77cac commit 2be22e9
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 40 deletions.
59 changes: 31 additions & 28 deletions lib/dcerpc-srvsvc.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@ p_syntax_id_t srvsvc_interface = {
/*
* SRVSVC BEGIN: DEFINITIONS FROM SRVSVC.IDL
*/
/*
typedef struct {
[string,charset(UTF16)] uint16 *name;
srvsvc_ShareType type;
[string,charset(UTF16)] uint16 *comment;
} srvsvc_NetShareInfo1;
*/
#if 0
typedef struct {
[string,charset(UTF16)] uint16 *name;
srvsvc_ShareType type;
[string,charset(UTF16)] uint16 *comment;
} srvsvc_NetShareInfo1;
#endif

static int
srvsvc_NetShareInfo1_coder(struct dcerpc_context *ctx,
struct dcerpc_pdu *pdu,
Expand Down Expand Up @@ -120,12 +121,13 @@ srvsvc_NetShareInfo1_array_coder(struct dcerpc_context *ctx,
return offset;
}

/*
typedef struct {
uint32 count;
[size_is(count)] srvsvc_NetShareInfo1 *array;
} srvsvc_NetShareCtr1;
*/
#if 0
typedef struct {
uint32 count;
[size_is(count)] srvsvc_NetShareInfo1 *array;
} srvsvc_NetShareCtr1;
#endif

static int
srvsvc_NetShareCtr1_coder(struct dcerpc_context *dce, struct dcerpc_pdu *pdu,
struct smb2_iovec *iov, int offset,
Expand All @@ -152,21 +154,22 @@ srvsvc_NetShareCtr1_coder(struct dcerpc_context *dce, struct dcerpc_pdu *pdu,
return offset;
}

/*
typedef union {
[case(0)] srvsvc_NetShareCtr0 *ctr0;
[case(1)] srvsvc_NetShareCtr1 *ctr1;
[case(2)] srvsvc_NetShareCtr2 *ctr2;
[case(501)] srvsvc_NetShareCtr501 *ctr501;
[case(502)] srvsvc_NetShareCtr502 *ctr502;
[case(1004)] srvsvc_NetShareCtr1004 *ctr1004;
[case(1005)] srvsvc_NetShareCtr1005 *ctr1005;
[case(1006)] srvsvc_NetShareCtr1006 *ctr1006;
[case(1007)] srvsvc_NetShareCtr1007 *ctr1007;
[case(1501)] srvsvc_NetShareCtr1501 *ctr1501;
[default] ;
} srvsvc_NetShareCtr;
*/
#if 0
typedef union {
[case(0)] srvsvc_NetShareCtr0 *ctr0;
[case(1)] srvsvc_NetShareCtr1 *ctr1;
[case(2)] srvsvc_NetShareCtr2 *ctr2;
[case(501)] srvsvc_NetShareCtr501 *ctr501;
[case(502)] srvsvc_NetShareCtr502 *ctr502;
[case(1004)] srvsvc_NetShareCtr1004 *ctr1004;
[case(1005)] srvsvc_NetShareCtr1005 *ctr1005;
[case(1006)] srvsvc_NetShareCtr1006 *ctr1006;
[case(1007)] srvsvc_NetShareCtr1007 *ctr1007;
[case(1501)] srvsvc_NetShareCtr1501 *ctr1501;
[default] ;
} srvsvc_NetShareCtr;
#endif

static int
srvsvc_NetShareCtr_coder(struct dcerpc_context *ctx, struct dcerpc_pdu *pdu,
struct smb2_iovec *iov, int offset,
Expand Down
5 changes: 3 additions & 2 deletions lib/dcerpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,9 @@ struct dcerpc_pdu {

/* optional authentication verifier */
/* following fields present iff auth_length != 0 */
/*auth_verifier_co_t auth_verifier; */

#if 0
auth_verifier_co_t auth_verifier;
#endif
struct dcerpc_context *dce;
dcerpc_cb cb;
void *cb_data;
Expand Down
5 changes: 3 additions & 2 deletions lib/libsmb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,12 @@ static const char SmbSign[] = "SmbSign";
static const char SMB2AESCCM[] = "SMB2AESCCM";
static const char ServerOut[] = "ServerOut";
static const char ServerIn[] = "ServerIn ";
/* The following strings will be used for deriving other keys
/* The following strings will be used for deriving other keys */
#if 0
static const char SMB2APP[] = "SMB2APP";
static const char SmbRpc[] = "SmbRpc";
static const char SMBAppKey[] = "SMBAppKey";
*/
#endif

#ifndef O_ACCMODE
#define O_ACCMODE (O_RDWR|O_WRONLY|O_RDONLY)
Expand Down
6 changes: 4 additions & 2 deletions lib/md5.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,11 @@ MD5Final(md5byte digest[16], struct MD5Context *ctx)
#ifndef ASM_MD5

/* The four core functions - F1 is optimized somewhat */

/* #define F1(x, y, z) (x & y | ~x & z) */
#if 0
#define F1(x, y, z) (x & y | ~x & z)
#else
#define F1(x, y, z) (z ^ (x & (y ^ z)))
#endif
#define F2(x, y, z) F1(z, x, y)
#define F3(x, y, z) (x ^ y ^ z)
#define F4(x, y, z) (y ^ (x | ~z))
Expand Down
12 changes: 6 additions & 6 deletions lib/sha384-512.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,18 +816,18 @@ SHA384_512ProcessMessageBlock (SHA512Context * context)

for (t = t2 = 0; t < 80; t++, t2 += 2)
{
/*
* temp1 = H + SHA512_SIGMA1(E) + SHA_Ch(E,F,G) + K[t] + W[t];
*/
#if 0
temp1 = H + SHA512_SIGMA1(E) + SHA_Ch(E,F,G) + K[t] + W[t];
#endif
SHA512_SIGMA1 (E, temp1);
SHA512_ADD (H, temp1, temp2);
SHA_Ch (E, F, G, temp3);
SHA512_ADD (temp2, temp3, temp4);
SHA512_ADD (&K[t2], &W[t2], temp5);
SHA512_ADD (temp4, temp5, temp1);
/*
* temp2 = SHA512_SIGMA0(A) + SHA_Maj(A,B,C);
*/
#if 0
temp2 = SHA512_SIGMA0(A) + SHA_Maj(A,B,C);
#endif
SHA512_SIGMA0 (A, temp3);
SHA_Maj (A, B, C, temp4);
SHA512_ADD (temp3, temp4, temp2);
Expand Down

0 comments on commit 2be22e9

Please sign in to comment.