From e481385391a25c19d82ce93fbec11a973cf82e9f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 28 Oct 2004 12:46:59 +0000 Subject: r3322: fixed a bunch of warnings in the build, including one case where it was a real bug (This used to be commit 02d5d0f685e44bd66aff4a007f0bf34c8f915574) --- source4/librpc/idl/epmapper.idl | 4 ++-- source4/librpc/ndr/ndr.c | 2 ++ source4/librpc/rpc/dcerpc_smb.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/idl/epmapper.idl b/source4/librpc/idl/epmapper.idl index 6a60c7c47b..ce1776f34e 100644 --- a/source4/librpc/idl/epmapper.idl +++ b/source4/librpc/idl/epmapper.idl @@ -222,12 +222,12 @@ interface epmapper non-aligned. I wonder what sort of wicked substance these guys were smoking? */ - typedef [flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN)] struct { + typedef [gensize,flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN)] struct { uint16 num_floors; epm_floor floors[num_floors]; } epm_tower; - typedef [gensize] struct { + typedef struct { [value(ndr_size_epm_tower(0, &r->tower,ndr->flags))] uint32 tower_length; [subcontext(4)] epm_tower tower; } epm_twr_t; diff --git a/source4/librpc/ndr/ndr.c b/source4/librpc/ndr/ndr.c index 02eb3e95ba..3462fb20c9 100644 --- a/source4/librpc/ndr/ndr.c +++ b/source4/librpc/ndr/ndr.c @@ -390,6 +390,8 @@ static NTSTATUS ndr_map_error(enum ndr_err_code err) return NT_STATUS_BUFFER_TOO_SMALL; case NDR_ERR_ALLOC: return NT_STATUS_NO_MEMORY; + default: + break; } /* we should all error codes to different status codes */ diff --git a/source4/librpc/rpc/dcerpc_smb.c b/source4/librpc/rpc/dcerpc_smb.c index cfb02680e2..a6307a9413 100644 --- a/source4/librpc/rpc/dcerpc_smb.c +++ b/source4/librpc/rpc/dcerpc_smb.c @@ -394,7 +394,7 @@ NTSTATUS dcerpc_pipe_open_smb(struct dcerpc_pipe **p, io.ntcreatex.in.security_flags = 0; io.ntcreatex.in.fname = pipe_name; - status = smb_raw_open(tree, pipe_name, &io); + status = smb_raw_open(tree, tree, &io); if (!NT_STATUS_IS_OK(status)) { return status; -- cgit