server: Remove some dead initializations (Clang).

This commit is contained in:
Alexandre Julliard 2024-09-11 17:11:49 +02:00
parent 322b5334a8
commit 4be18ce16b
6 changed files with 9 additions and 12 deletions

View file

@ -1071,7 +1071,7 @@ static void dir_add_to_existing_notify( struct dir *dir )
/* check if it's in the list of inodes we want to watch */
if (fstat( unix_fd, &st_new )) return;
if ((inode = find_inode( st_new.st_dev, st_new.st_ino ))) return;
if (find_inode( st_new.st_dev, st_new.st_ino )) return;
/* lookup the parent */
if (!(link = get_path_from_fd( unix_fd, 3 ))) return;

View file

@ -838,7 +838,7 @@ static struct security_descriptor *process_get_sd( struct object *obj )
process_default_sd->dacl_len = dacl_len;
sid = (struct sid *)(process_default_sd + 1);
sid = copy_sid( sid, &builtin_admins_sid );
sid = copy_sid( sid, &domain_users_sid );
copy_sid( sid, &domain_users_sid );
dacl = (struct acl *)((char *)(process_default_sd + 1) + admins_sid_len + users_sid_len);
dacl->revision = ACL_REVISION;

View file

@ -360,10 +360,9 @@ static void sync_input_keystate( struct thread_input *input )
{
const input_shm_t *input_shm = input->shared;
const desktop_shm_t *desktop_shm;
struct desktop *desktop;
int i;
if (!(desktop = input->desktop) || input_shm->keystate_lock) return;
if (!input->desktop || input_shm->keystate_lock) return;
desktop_shm = input->desktop->shared;
SHARED_WRITE_BEGIN( input_shm, input_shm_t )

View file

@ -446,7 +446,7 @@ static struct security_descriptor *key_get_sd( struct object *obj )
key_default_sd->dacl_len = dacl_len;
sid = (struct sid *)(key_default_sd + 1);
sid = copy_sid( sid, &builtin_admins_sid );
sid = copy_sid( sid, &builtin_admins_sid );
copy_sid( sid, &builtin_admins_sid );
dacl = (struct acl *)((char *)(key_default_sd + 1) + 2 * admins_sid_len);
dacl->revision = ACL_REVISION;
@ -1001,7 +1001,7 @@ static void enum_key( struct key *key, int index, int info_class, struct enum_ke
static void rename_key( struct key *key, const struct unicode_str *new_name )
{
struct object_name *new_name_ptr;
struct key *subkey, *parent = get_parent( key );
struct key *parent = get_parent( key );
data_size_t len;
int i, index, cur_index;
@ -1014,7 +1014,7 @@ static void rename_key( struct key *key, const struct unicode_str *new_name )
}
/* check for existing subkey with the same name */
if (!parent || (subkey = find_subkey( parent, new_name, &index )))
if (!parent || find_subkey( parent, new_name, &index ))
{
set_error( STATUS_CANNOT_DELETE );
return;
@ -1635,7 +1635,7 @@ static int load_value( struct key *key, const char *buffer, struct file_load_inf
case REG_SZ:
if (!get_file_tmp_space( info, strlen(buffer) * sizeof(WCHAR) )) return 0;
len = info->tmplen;
if ((res = parse_strW( info->tmp, &len, buffer, '\"' )) == -1) goto error;
if (parse_strW( info->tmp, &len, buffer, '\"' ) == -1) goto error;
ptr = info->tmp;
break;
case REG_DWORD:
@ -1696,7 +1696,7 @@ static int get_prefix_len( struct key *key, const char *name, struct file_load_i
if (!get_file_tmp_space( info, strlen(name) * sizeof(WCHAR) )) return 0;
len = info->tmplen;
if ((res = parse_strW( info->tmp, &len, name, ']' )) == -1)
if (parse_strW( info->tmp, &len, name, ']' ) == -1)
{
file_read_error( "Malformed key", info );
return 0;

View file

@ -285,7 +285,6 @@ int sd_is_valid( const struct security_descriptor *sd, data_size_t size )
dacl = sd_get_dacl( sd, &dummy );
if (dacl && !acl_is_valid( dacl, sd->dacl_len ))
return FALSE;
offset += sd->dacl_len;
return TRUE;
}

View file

@ -982,7 +982,7 @@ static void dump_varargs_startup_info( const char *prefix, data_size_t size )
pos = dump_inline_unicode_string( "\",title=L\"", pos, info.title_len, size );
pos = dump_inline_unicode_string( "\",desktop=L\"", pos, info.desktop_len, size );
pos = dump_inline_unicode_string( "\",shellinfo=L\"", pos, info.shellinfo_len, size );
pos = dump_inline_unicode_string( "\",runtime=L\"", pos, info.runtime_len, size );
dump_inline_unicode_string( "\",runtime=L\"", pos, info.runtime_len, size );
fprintf( stderr, "\"}" );
remove_data( size );
}
@ -1185,7 +1185,6 @@ static void dump_inline_security_descriptor( const char *prefix, const struct se
if ((sd->dacl_len >= MAX_ACL_LEN) || (offset + sd->dacl_len > size))
return;
dump_inline_acl( ",dacl=", (const struct acl *)((const char *)sd + offset), sd->dacl_len );
offset += sd->dacl_len;
}
fputc( '}', stderr );
}