r11675: a more general way of getting rid of compiler warnings and errors
authorStefan Metzmacher <metze@samba.org>
Fri, 11 Nov 2005 10:46:31 +0000 (10:46 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:46:11 +0000 (13:46 -0500)
metze
(This used to be commit 653f5ccd61f2555bbd49b81c5cc660962b31aa68)

source4/include/byteorder.h
source4/libcli/smb2/request.c

index d0402d0dcc0300a55eb1b04da2dc73b246766896..941dee9e88fe647ef64f4f4a0dd9efed69f3ffaa 100644 (file)
@@ -218,7 +218,7 @@ static __inline__ void st_le32(uint32_t *addr, const uint32_t val)
 #define VWV(vwv) ((vwv)*2)
 
 /* 64 bit macros */
-#define SBVAL(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32))
+#define SBVAL(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,((uint64_t)(v))>>32))
 #define BVAL(p, ofs) (IVAL(p,ofs) | (((uint64_t)IVAL(p,(ofs)+4)) << 32))
 
 #endif /* _BYTEORDER_H */
index deadd1794f6dc52777c591c4129ae10cc3cdb740..7e25de99a858ed77a3478e9dab74d1d0f8e5f67b 100644 (file)
@@ -70,7 +70,7 @@ struct smb2_request *smb2_request_init(struct smb2_transport *transport,
        SBVAL(req->out.hdr, SMB2_HDR_SEQNUM,  req->seqnum);
        SIVAL(req->out.hdr, SMB2_HDR_PID,     0);
        SIVAL(req->out.hdr, SMB2_HDR_TID,     0);
-       SBVAL(req->out.hdr, SMB2_HDR_UID,     (uint64_t)0);
+       SBVAL(req->out.hdr, SMB2_HDR_UID,     0);
        memset(req->out.hdr+SMB2_HDR_SIG, 0, 16);
 
        return req;