dlls/ntdll/directory.c: avoid one warning around assert(0)

Gerald Pfeifer gerald at pfeifer.com
Fri Dec 25 04:14:07 CST 2009


Some compiler/libc combos are more clever than others when it comes to 
the handling of assert().  The native FreeBSD 7 toolchain for example
struggles with this instance, and interestingly enough only a handful
further ones (at most).

Gerald

ChangeLog:
Explicitly return a value in all cases in dir_info_size().

diff --git a/dlls/ntdll/directory.c 
b/dlls/ntdll/directory.c index 350dd8a..7b124af 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -241,6 +241,7 @@ static inline unsigned int dir_info_size( FILE_INFORMATION_CLASS class, unsigned
         return (FIELD_OFFSET( FILE_ID_FULL_DIRECTORY_INFORMATION, FileName[len] ) + 3) & ~3;
     default:
         assert(0);
+        return 0;
     }
 }
 



More information about the wine-patches mailing list