diff options
author | Volker Lendecke <vl@samba.org> | 2008-01-20 17:35:25 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-01-20 17:44:40 +0100 |
commit | 33f3eeaa00974860dfc45962d5fd34cf05396c76 (patch) | |
tree | d826c4af466796b6adf665a6e6d66597aee50131 | |
parent | b1017bb551fd28d2f9562acb1ff7f0dde933417a (diff) | |
download | samba-33f3eeaa00974860dfc45962d5fd34cf05396c76.tar.gz samba-33f3eeaa00974860dfc45962d5fd34cf05396c76.tar.bz2 samba-33f3eeaa00974860dfc45962d5fd34cf05396c76.zip |
Fix some "set but never used" warnings
(This used to be commit 4a6dadc5178f4861e9c032321939db3b639734b5)
-rw-r--r-- | source3/lib/dbwrap_tdb.c | 4 | ||||
-rw-r--r-- | source3/locking/brlock.c | 5 | ||||
-rw-r--r-- | source3/modules/vfs_streams_xattr.c | 4 | ||||
-rw-r--r-- | source3/registry/reg_api.c | 6 | ||||
-rw-r--r-- | source3/smbd/reply.c | 4 |
5 files changed, 6 insertions, 17 deletions
diff --git a/source3/lib/dbwrap_tdb.c b/source3/lib/dbwrap_tdb.c index e87ceb428f..18f9495931 100644 --- a/source3/lib/dbwrap_tdb.c +++ b/source3/lib/dbwrap_tdb.c @@ -91,7 +91,6 @@ static struct db_record *db_tdb_fetch_locked(struct db_context *db, struct db_tdb_ctx *ctx = talloc_get_type_abort(db->private_data, struct db_tdb_ctx); struct tdb_fetch_locked_state state; - int res; /* Do not accidently allocate/deallocate w/o need when debug level is lower than needed */ if(DEBUGLEVEL >= 10) { @@ -110,8 +109,7 @@ static struct db_record *db_tdb_fetch_locked(struct db_context *db, state.mem_ctx = mem_ctx; state.result = NULL; - res = tdb_parse_record(ctx->wtdb->tdb, key, db_tdb_fetchlock_parse, - &state); + tdb_parse_record(ctx->wtdb->tdb, key, db_tdb_fetchlock_parse, &state); if (state.result == NULL) { db_tdb_fetchlock_parse(key, tdb_null, &state); diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c index 4191871bb1..341d00f3fe 100644 --- a/source3/locking/brlock.c +++ b/source3/locking/brlock.c @@ -1539,11 +1539,6 @@ int brl_forall(void (*fn)(struct file_id id, struct server_id pid, static int byte_range_lock_destructor(struct byte_range_lock *br_lck) { - TDB_DATA key; - - key.dptr = (uint8 *)&br_lck->key; - key.dsize = sizeof(struct file_id); - if (br_lck->read_only) { SMB_ASSERT(!br_lck->modified); } diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index 87bcf22fb3..7ce90ab30b 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -618,6 +618,10 @@ static ssize_t streams_xattr_pwrite(vfs_handle_struct *handle, TALLOC_FREE(ea.value.data); + if (ret == -1) { + return -1; + } + return n; } diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c index 788af28d5d..9c4009368d 100644 --- a/source3/registry/reg_api.c +++ b/source3/registry/reg_api.c @@ -453,7 +453,6 @@ WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent, TALLOC_CTX *mem_ctx; char *path, *end; WERROR err; - REGSUBKEY_CTR *subkeys; if (!(mem_ctx = talloc_new(ctx))) return WERR_NOMEM; @@ -517,11 +516,6 @@ WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent, * Actually create the subkey */ - if (!(subkeys = TALLOC_ZERO_P(mem_ctx, REGSUBKEY_CTR))) { - err = WERR_NOMEM; - goto done; - } - err = fill_subkey_cache(create_parent); if (!W_ERROR_IS_OK(err)) goto done; diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 5a5eb1e190..4ea81a3819 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -3375,7 +3375,6 @@ void error_to_writebrawerr(struct smb_request *req) void reply_writebraw(struct smb_request *req) { connection_struct *conn = req->conn; - int outsize = 0; char *buf = NULL; ssize_t nwritten=0; ssize_t total_written=0; @@ -3485,8 +3484,7 @@ void reply_writebraw(struct smb_request *req) * it to send more bytes */ memcpy(buf, req->inbuf, smb_size); - outsize = srv_set_message(buf, - Protocol>PROTOCOL_COREPLUS?1:0,0,True); + srv_set_message(buf,Protocol>PROTOCOL_COREPLUS?1:0,0,True); SCVAL(buf,smb_com,SMBwritebraw); SSVALS(buf,smb_vwv0,0xFFFF); show_msg(buf); |