summaryrefslogtreecommitdiff
path: root/include/tools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-03-04 20:11:20 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-03-05 08:46:36 +0100
commitbc3c181b81f931a931e822ab0fe51a22bdd433ba (patch)
tree9dbe81c933a09c8a2e08879122e1eee3d5b9c576 /include/tools
parent2cf8e2b9eee9f17f947c0b0af93ab1e983874a87 (diff)
Introduce SVBT16ToInt16 for reading sal_Int16 instead of sal_uInt16
This change does not change the actual results, but avoids Clang -fsanitize=implicit-signed-integer-truncation warnings Change-Id: If82193d7a6ad6bdadb4e8a8b3ed3bbdf3d88c4a3 Reviewed-on: https://gerrit.libreoffice.org/68706 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/tools')
-rw-r--r--include/tools/solar.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/tools/solar.h b/include/tools/solar.h
index 5d078763d3f7..3fd676acbc2a 100644
--- a/include/tools/solar.h
+++ b/include/tools/solar.h
@@ -49,6 +49,7 @@ typedef sal_uInt8 SVBT64[8];
inline sal_uInt16 SVBT16ToUInt16( const SVBT16 p ) { return static_cast<sal_uInt16>
(static_cast<sal_uInt16>(p[0])
+ (static_cast<sal_uInt16>(p[1]) << 8)); }
+inline sal_Int16 SVBT16ToInt16( const SVBT16 p ) { return sal_Int16(SVBT16ToUInt16(p)); }
inline sal_uInt32 SVBT32ToUInt32 ( const SVBT32 p ) { return static_cast<sal_uInt32>
(static_cast<sal_uInt32>(p[0])
+ (static_cast<sal_uInt32>(p[1]) << 8)