diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-07-21 13:12:55 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-07-21 13:12:55 +0100 |
commit | c35fad42b0b1b2084154ea61881a920928e7f777 (patch) | |
tree | 9e4b0f93f6373eb29cd66ee91c3885174c50d138 /sal | |
parent | b09acc30c9f2f7b165959d35c19b808d16988a7c (diff) |
use SAL_WARN_UNUSED_RESULT
Diffstat (limited to 'sal')
-rw-r--r-- | sal/inc/osl/file.h | 2 | ||||
-rw-r--r-- | sal/inc/osl/file.hxx | 2 | ||||
-rw-r--r-- | sal/inc/sal/types.h | 2 | ||||
-rw-r--r-- | sal/qa/osl/file/osl_File.cxx | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/sal/inc/osl/file.h b/sal/inc/osl/file.h index e148b41073b7..c5ff5585f578 100644 --- a/sal/inc/osl/file.h +++ b/sal/inc/osl/file.h @@ -732,7 +732,7 @@ oslFileError SAL_CALL osl_openFile( rtl_uString *pustrFileURL, oslFileHandle *pH @see osl_getFilePos() */ -oslFileError SAL_CALL osl_setFilePos( oslFileHandle Handle, sal_uInt32 uHow, sal_Int64 uPos ); +oslFileError SAL_CALL osl_setFilePos( oslFileHandle Handle, sal_uInt32 uHow, sal_Int64 uPos ) SAL_WARN_UNUSED_RESULT; /** Retrieve the current position of the internal pointer of an open file. diff --git a/sal/inc/osl/file.hxx b/sal/inc/osl/file.hxx index bf9547655586..b02ce853c91e 100644 --- a/sal/inc/osl/file.hxx +++ b/sal/inc/osl/file.hxx @@ -988,7 +988,7 @@ public: @see getPos() */ - inline RC setPos( sal_uInt32 uHow, sal_Int64 uPos ) + inline RC setPos( sal_uInt32 uHow, sal_Int64 uPos ) SAL_WARN_UNUSED_RESULT { return (RC) osl_setFilePos( _pData, uHow, uPos ); } diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h index bf7d4109db3f..a89b9e2f85fb 100644 --- a/sal/inc/sal/types.h +++ b/sal/inc/sal/types.h @@ -302,7 +302,7 @@ typedef void * sal_Handle; Compilers that support a construct of this nature will emit a compile time warning on unchecked return value. */ -#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define SAL_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #else # define SAL_WARN_UNUSED_RESULT diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 47895582b648..2cb0bb3e83fe 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -4246,8 +4246,8 @@ namespace osl_File //check if is the new file File newFile( aTmpName4 ); newFile.open( osl_File_OpenFlag_Write | osl_File_OpenFlag_Read ); - newFile.setPos( osl_Pos_End, 0 ); - // CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 ); + nError1 = newFile.setPos( osl_Pos_End, 0 ); + CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 ); sal_uInt64 nFilePointer; nError1 = newFile.getPos( nFilePointer ); CPPUNIT_ASSERT( ::osl::FileBase::E_None == nError1 ); |