[SCM] Samba Shared Repository - branch master updated
Gary Lockyer
gary at samba.org
Wed Aug 28 03:07:02 UTC 2019
The branch, master has been updated
via 0be320393b8 s3/libsmb: clang: Fix 'Value stored during initialization is never read'
via 0c91634ebe4 s3/libsmb: clang: Fix 'Value stored to 'status' is never read'
via f8b5c47ad51 s3/libsmb: clang: Fix 'warning: Value stored to 'status' is never read'
via 32aa8f9195c s3/libsmb: clang: Fix 2nd function call argument is an uninitialized value
via 6ef4736c3f6 s3/libsmb: clang: Fix Value set during its initialization is never read
via 2abe785264b s3/libsmb: clang: Fix: The right operand of '<' is a garbage value
via 52d20087f62 s3/libads: clang: Fix Value stored to 'canon_princ' is never read
via 61c5b891a14 s3/libsmb: clang: Fix value stored to 'offset' is never read
from 2575e4066bf s3/libsmb: clang: Fix 'warning: Assigned value is garbage or undefined '
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 0be320393b85003f65d74e4e6a1b867a8d21eb1c
Author: Noel Power <noel.power at suse.com>
Date: Fri Aug 9 16:06:20 2019 +0100
s3/libsmb: clang: Fix 'Value stored during initialization is never read'
Fixes:
source3/libsmb/cliquota.c:340:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
source3/libsmb/cliquota.c:357:4: warning: Value stored to 'status' is never read <--[clang]
status = NT_STATUS_OK;
^ ~~~~~~~~~~~~
2 warnings generated.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
Autobuild-User(master): Gary Lockyer <gary at samba.org>
Autobuild-Date(master): Wed Aug 28 03:06:42 UTC 2019 on sn-devel-184
commit 0c91634ebe4065bfb66c5cf575659aa1150fc2fb
Author: Noel Power <noel.power at suse.com>
Date: Fri Aug 9 16:02:18 2019 +0100
s3/libsmb: clang: Fix 'Value stored to 'status' is never read'
Fixes:
source3/libsmb/cliquota.c:340:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
/home/samba/samba/source3/libsmb/cliquota.c:357:4: warning: Value stored to 'status' is never read <--[clang]
status = NT_STATUS_OK;
^ ~~~~~~~~~~~~
2 warnings generated.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit f8b5c47ad51f8ee727122964099b1b3dc36028d9
Author: Noel Power <noel.power at suse.com>
Date: Fri Aug 9 16:00:35 2019 +0100
s3/libsmb: clang: Fix 'warning: Value stored to 'status' is never read'
Fixes:
source3/libsmb/namequery.c:2938:2: warning: Value stored to 'status' is never read <--[clang]
status = NT_STATUS_OK;
^ ~~~~~~~~~~~~
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 32aa8f9195ce83073a04d24583de41ddbf4836c2
Author: Noel Power <noel.power at suse.com>
Date: Thu Aug 8 15:24:16 2019 +0100
s3/libsmb: clang: Fix 2nd function call argument is an uninitialized value
source3/libsmb/namequery.c:2719:11: warning: 2nd function call argument is an uninitialized value <--[clang]
if (!convert_ss2service(return_iplist,
^
source3/libsmb/namequery.c:2733:10: warning: 2nd function call argument is an uninitialized value <--[clang]
if (!convert_ss2service(return_iplist,
^
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 6ef4736c3f642d5b1625f6edb8b3cfdc6e7e3736
Author: Noel Power <noel.power at suse.com>
Date: Thu Aug 8 15:18:03 2019 +0100
s3/libsmb: clang: Fix Value set during its initialization is never read
Fixes:
source3/libsmb/namequery.c:2584:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 2abe785264b105fc3a5b2ce6bd3df7d24fbdf360
Author: Noel Power <noel.power at suse.com>
Date: Thu Aug 8 15:15:11 2019 +0100
s3/libsmb: clang: Fix: The right operand of '<' is a garbage value
Fixes:
source3/libsmb/namequery.c:977:12: warning: The right operand of '<' is a garbage value <--[clang]
for (i=0;i<count;i++) {
^~~~~~
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 52d20087f620704549f5a5cdcbec79cb08a36290
Author: Noel Power <noel.power at suse.com>
Date: Thu Aug 8 15:06:28 2019 +0100
s3/libads: clang: Fix Value stored to 'canon_princ' is never read
Fixes:
source3/libads/kerberos.c:192:2: warning: Value stored to 'canon_princ' is never read <--[clang]
canon_princ = me;
^ ~~
1 warning generated.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 61c5b891a14e47c784e0aae272630d78bf9c7831
Author: Noel Power <noel.power at suse.com>
Date: Thu Aug 8 14:59:55 2019 +0100
s3/libsmb: clang: Fix value stored to 'offset' is never read
Fixes:
source3/libsmb/nmblib.c:479:2: warning: Value stored to 'offset' is never read <--[clang]
offset += 10+rec->rdlength;
^ ~~~~~~~~~~~~~~~~
1 warning generated.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
-----------------------------------------------------------------------
Summary of changes:
source3/libads/kerberos.c | 3 ++-
source3/libsmb/cliquota.c | 6 ++----
source3/libsmb/namequery.c | 20 ++++++++++----------
source3/libsmb/nmblib.c | 5 ++---
4 files changed, 16 insertions(+), 18 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c
index 721c3c2a929..9fbe7dd0f07 100644
--- a/source3/libads/kerberos.c
+++ b/source3/libads/kerberos.c
@@ -189,9 +189,10 @@ int kerberos_kinit_password_ext(const char *principal,
goto out;
}
- canon_princ = me;
#ifndef SAMBA4_USES_HEIMDAL /* MIT */
canon_princ = my_creds.client;
+#else
+ canon_princ = me;
#endif /* MIT */
if ((code = krb5_cc_initialize(ctx, cc, canon_princ))) {
diff --git a/source3/libsmb/cliquota.c b/source3/libsmb/cliquota.c
index 17655e095f3..45cd3280045 100644
--- a/source3/libsmb/cliquota.c
+++ b/source3/libsmb/cliquota.c
@@ -337,7 +337,7 @@ cli_set_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_LIST *qtl)
uint16_t setup[1];
uint8_t params[2];
DATA_BLOB data = data_blob_null;
- NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
+ NTSTATUS status;
if (!cli || !qtl) {
smb_panic("cli_set_user_quota() called with NULL Pointer!");
@@ -353,9 +353,7 @@ cli_set_user_quota(struct cli_state *cli, int quota_fnum, SMB_NTQUOTA_LIST *qtl)
* smb1 doesn't send NT_STATUS_NO_MORE_ENTRIES so swallow
* this status.
*/
- if (NT_STATUS_EQUAL(status, NT_STATUS_NO_MORE_ENTRIES)) {
- status = NT_STATUS_OK;
- } else {
+ if (!NT_STATUS_EQUAL(status, NT_STATUS_NO_MORE_ENTRIES)) {
goto cleanup;
}
}
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index f61e2507cce..5d4fca70b20 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -931,7 +931,7 @@ bool name_status_find(const char *q_name,
struct sockaddr_storage ss;
struct node_status *addrs = NULL;
struct nmb_name nname;
- int count, i;
+ int count = 0, i;
bool result = false;
NTSTATUS status;
@@ -2709,7 +2709,7 @@ NTSTATUS internal_resolve_name(const char *name,
}
} else if (strequal(tok, "wins")) {
/* don't resolve 1D via WINS */
- struct sockaddr_storage *ss_list;
+ struct sockaddr_storage *ss_list = NULL;
if (name_type != 0x1D) {
status = resolve_wins(name, name_type,
talloc_tos(),
@@ -2725,7 +2725,7 @@ NTSTATUS internal_resolve_name(const char *name,
}
}
} else if (strequal(tok, "bcast")) {
- struct sockaddr_storage *ss_list;
+ struct sockaddr_storage *ss_list = NULL;
status = name_resolve_bcast(
name, name_type, talloc_tos(),
&ss_list, return_count);
@@ -2749,7 +2749,7 @@ NTSTATUS internal_resolve_name(const char *name,
SAFE_FREE(*return_iplist);
*return_count = 0;
- return NT_STATUS_UNSUCCESSFUL;
+ return status;
done:
@@ -2916,16 +2916,16 @@ NTSTATUS resolve_name_list(TALLOC_CTX *ctx,
}
}
if (num_entries == 0) {
- SAFE_FREE(ss_list);
- return NT_STATUS_BAD_NETWORK_NAME;
+ status = NT_STATUS_BAD_NETWORK_NAME;
+ goto done;
}
*return_ss_arr = talloc_array(ctx,
struct sockaddr_storage,
num_entries);
if (!(*return_ss_arr)) {
- SAFE_FREE(ss_list);
- return NT_STATUS_NO_MEMORY;
+ status = NT_STATUS_NO_MEMORY;
+ goto done;
}
for (i=0, num_entries = 0; i<count; i++) {
@@ -2937,9 +2937,9 @@ NTSTATUS resolve_name_list(TALLOC_CTX *ctx,
status = NT_STATUS_OK;
*p_num_entries = num_entries;
-
+done:
SAFE_FREE(ss_list);
- return NT_STATUS_OK;
+ return status;
}
/********************************************************
diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c
index 727939575a7..b6dca800e94 100644
--- a/source3/libsmb/nmblib.c
+++ b/source3/libsmb/nmblib.c
@@ -462,13 +462,12 @@ static int put_compressed_name_ptr(unsigned char *buf,
struct res_rec *rec,
int ptr_offset)
{
- int ret=0;
+ int ret=offset;
if (buf) {
buf[offset] = (0xC0 | ((ptr_offset >> 8) & 0xFF));
buf[offset+1] = (ptr_offset & 0xFF);
}
offset += 2;
- ret += 2;
if (buf) {
RSSVAL(buf,offset,rec->rr_type);
RSSVAL(buf,offset+2,rec->rr_class);
@@ -477,7 +476,7 @@ static int put_compressed_name_ptr(unsigned char *buf,
memcpy(buf+offset+10,rec->rdata,rec->rdlength);
}
offset += 10+rec->rdlength;
- ret += 10+rec->rdlength;
+ ret = (offset - ret);
return ret;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list