On 07/14/2012 01:01 AM, julien2412 wrote:
Cppcheck reported this :
[sal/osl/unx/profile.c:1306] -> [sal/osl/unx/profile.c:1306]: (style) Same
expression on both sides of '|'
1306 if ( Flags & (osl_Profile_WRITELOCK | osl_Profile_WRITELOCK
) )
1307 {
1308 OslProfile_lockFile(pFile, un_lock);
1309 }
in comparison, there's on sal/osl/w32/profile.cxx this :
1225 if ( ProfileFlags & (osl_Profile_WRITELOCK |
osl_Profile_READLOCK ) )
1226 {
1227 #ifdef DEBUG_OSL_PROFILE
1228 OSL_TRACE("locking '%s' file",pszFilename);
1229 #endif
1230
1231 lockFile(pFile, bWriteable ? write_lock : read_lock);
1232 }
Should the if part in profile.c simply replaced by :
if ( Flags & (osl_Profile_WRITELOCK | osl_Profile_READLOCK ) )
or is it less obvious ?
Looks like it should indeed be changed to WRITELOCK | READLOCK. (Note
that that whole profile stuff is deprecated, so the broken code likely
makes no difference in practice.)
Stephan
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice