fix for warning C4204: non-constant aggregate initializer

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2010-11-08 12:29:03 -05:00
parent 575200952a
commit 8321939c90
2 changed files with 7 additions and 3 deletions

View file

@ -216,11 +216,14 @@ int nfs41_server_find_or_create(
IN const netaddr4 *addr, IN const netaddr4 *addr,
OUT nfs41_server **server_out) OUT nfs41_server **server_out)
{ {
const struct server_info info = { server_scope, server_owner_major_id }; struct server_info info;
struct list_entry *entry; struct list_entry *entry;
nfs41_server *server; nfs41_server *server;
int status; int status;
info.owner = server_owner_major_id;
info.scope = server_scope;
dprintf(SRVLVL, "--> nfs41_server_find_or_create(%s)\n", info.owner); dprintf(SRVLVL, "--> nfs41_server_find_or_create(%s)\n", info.owner);
EnterCriticalSection(&g_server_list.lock); EnterCriticalSection(&g_server_list.lock);

View file

@ -315,8 +315,9 @@ static int readdir_copy_entry(
lookup_entry(args->root, args->state->session, lookup_entry(args->root, args->state->session,
&args->state->file, entry); &args->state->file, entry);
} else if (entry->attr_info.type == NF4LNK) { } else if (entry->attr_info.type == NF4LNK) {
const nfs41_component name = { entry->name, nfs41_component name;
(unsigned short)entry->name_len - 1 }; name.name = entry->name;
name.len = (unsigned short)entry->name_len - 1;
/* look up the symlink target to see whether it's a directory */ /* look up the symlink target to see whether it's a directory */
lookup_symlink(args->root, args->state->session, lookup_symlink(args->root, args->state->session,
&args->state->file, &name, &entry->attr_info); &args->state->file, &name, &entry->attr_info);