quiet enum warnings

2011-06-09 Thread Stefan (metze) Metzmacher
Hi Matthias,

   case RAW_FILEINFO_GETATTR:
   info-getattr.out.attrib = name-dos.attrib;
   info-getattr.out.size   = name-st.st_size;
 @@ -333,9 +330,11 @@ static NTSTATUS pvfs_map_fileinfo(struct pvfs_state 
 *pvfs,
 
 name-original_name);
   NT_STATUS_HAVE_NO_MEMORY(info-all_info2.out.fname.s);
   return NT_STATUS_OK;
 +
 + default:
 + return NT_STATUS_INVALID_LEVEL;
   }
  
 - return NT_STATUS_INVALID_LEVEL;
  }

I think we should better fix this by adding the missing enum values
explicit instead of
using a default, as that will make sure we'll get a warning again if
someone adds a new
value.

metze



signature.asc
Description: OpenPGP digital signature


Re: quiet enum warnings

2011-06-09 Thread Matthias Dieter Wallnöfer

Okay, these are different point of views.

Tridge, what do you think?

Cheers,
Matthias

Stefan (metze) Metzmacher wrote:

Hi Matthias,

   

case RAW_FILEINFO_GETATTR:
info-getattr.out.attrib = name-dos.attrib;
info-getattr.out.size   = name-st.st_size;
@@ -333,9 +330,11 @@ static NTSTATUS pvfs_map_fileinfo(struct pvfs_state *pvfs,
  
name-original_name);
NT_STATUS_HAVE_NO_MEMORY(info-all_info2.out.fname.s);
return NT_STATUS_OK;
+
+   default:
+   return NT_STATUS_INVALID_LEVEL;
}

-   return NT_STATUS_INVALID_LEVEL;
  }
 

I think we should better fix this by adding the missing enum values
explicit instead of
using a default, as that will make sure we'll get a warning again if
someone adds a new
value.

metze