[Libreoffice-commits] core.git: registry/tools solenv/clang-format

2020-11-19 Thread Philipp Hofer (via logerrit)
 registry/tools/fileurl.cxx  |3 +--
 registry/tools/fileurl.hxx  |3 +--
 solenv/clang-format/excludelist |2 --
 3 files changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 5d8cf2021d8f7f171924f2b1adf824532cd67497
Author: Philipp Hofer 
AuthorDate: Thu Nov 12 13:10:05 2020 +0100
Commit: Christian Lohmaier 
CommitDate: Thu Nov 19 19:24:01 2020 +0100

tdf#123936 Formatting files in module registry with clang-format

Change-Id: I57dbd6b8c944f2adb158db9c3086b3ad26c5c084
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105697
Reviewed-by: Christian Lohmaier 
Tested-by: Christian Lohmaier 

diff --git a/registry/tools/fileurl.cxx b/registry/tools/fileurl.cxx
index dec3be5e5b0d..155995115b92 100644
--- a/registry/tools/fileurl.cxx
+++ b/registry/tools/fileurl.cxx
@@ -36,8 +36,7 @@ using osl::FileBase;
 
 namespace registry::tools
 {
-
-OUString convertToFileUrl(char const * filename, sal_Int32 length)
+OUString convertToFileUrl(char const* filename, sal_Int32 length)
 {
 OUString const uFileName(filename, length, osl_getThreadTextEncoding());
 if (strncmp(filename, "file://", 7) == 0)
diff --git a/registry/tools/fileurl.hxx b/registry/tools/fileurl.hxx
index b2a68502618c..c09c7ff6a913 100644
--- a/registry/tools/fileurl.hxx
+++ b/registry/tools/fileurl.hxx
@@ -24,8 +24,7 @@
 
 namespace registry::tools
 {
-
-OUString convertToFileUrl(char const * filename, sal_Int32 length);
+OUString convertToFileUrl(char const* filename, sal_Int32 length);
 
 } // namespace registry::tools
 
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index a405f5979149..3de0a580b7e4 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -8002,8 +8002,6 @@ registry/source/regkey.hxx
 registry/test/regdiagnose.h
 registry/test/testmerge.cxx
 registry/test/testregcpp.cxx
-registry/tools/fileurl.cxx
-registry/tools/fileurl.hxx
 registry/tools/options.cxx
 registry/tools/options.hxx
 registry/tools/regmerge.cxx
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: registry/tools

2018-10-19 Thread Libreoffice Gerrit user
 registry/tools/fileurl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 726328d26cd274ce72f2db2d84e3e915a4d142a2
Author: Caolán McNamara 
AuthorDate: Fri Oct 19 12:43:01 2018 +0100
Commit: Caolán McNamara 
CommitDate: Fri Oct 19 16:39:39 2018 +0200

expression is excessive

Change-Id: I9af0de0d0f3aed565ac396b15821812fd9922779
Reviewed-on: https://gerrit.libreoffice.org/61994
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/registry/tools/fileurl.cxx b/registry/tools/fileurl.cxx
index 46f0ba7b1140..cabfb16e95da 100644
--- a/registry/tools/fileurl.cxx
+++ b/registry/tools/fileurl.cxx
@@ -52,7 +52,7 @@ OUString convertToFileUrl(char const * filename, sal_Int32 
length)
 OUString uFileUrl;
 if (length > 0)
 {
-if ((filename[0] == '.') || (filename[0] != SEPARATOR))
+if (filename[0] != SEPARATOR)
 {
 // relative path name.
 OUString uWorkingDir;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: registry/tools

2017-05-27 Thread Chris Sherlock
 registry/tools/fileurl.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 3a6eb7d7e5aaa455d892d63f95cced03d3e32a95
Author: Chris Sherlock 
Date:   Sat May 27 00:27:32 2017 +1000

tdf#43157 - registry: convert from OSL_ASSERT to assert

Change-Id: I527920d3e970e5028ebc0a84d0b460cdee0f140b
Reviewed-on: https://gerrit.libreoffice.org/38077
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/registry/tools/fileurl.cxx b/registry/tools/fileurl.cxx
index 94a2488c892e..5bf64a1f383b 100644
--- a/registry/tools/fileurl.cxx
+++ b/registry/tools/fileurl.cxx
@@ -58,11 +58,11 @@ OUString convertToFileUrl(char const * filename, sal_Int32 
length)
 OUString uWorkingDir;
 if (osl_getProcessWorkingDir() != 
osl_Process_E_None)
 {
-OSL_ASSERT(false);
+assert(false);
 }
 if (FileBase::getAbsoluteFileURL(uWorkingDir, uFileName, uFileUrl) 
!= FileBase::E_None)
 {
-OSL_ASSERT(false);
+assert(false);
 }
 }
 else
@@ -70,7 +70,7 @@ OUString convertToFileUrl(char const * filename, sal_Int32 
length)
 // absolute path name.
 if (FileBase::getFileURLFromSystemPath(uFileName, uFileUrl) != 
FileBase::E_None)
 {
-OSL_ASSERT(false);
+assert(false);
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: registry/tools

2016-02-03 Thread Noel Grandin
 registry/tools/regcompare.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 0e414e1433acf775c17063cc748818ee7dd822e3
Author: Noel Grandin 
Date:   Wed Jan 27 11:06:24 2016 +0200

loplugin:fpcomparison in registry/

Change-Id: Ifdc2df9ba51ce8ef2c8793bb51c28a547f22214f
Reviewed-on: https://gerrit.libreoffice.org/21866
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/registry/tools/regcompare.cxx b/registry/tools/regcompare.cxx
index d5e33c7..901f719 100644
--- a/registry/tools/regcompare.cxx
+++ b/registry/tools/regcompare.cxx
@@ -25,6 +25,7 @@
 #include "options.hxx"
 
 #include 
+#include 
 #include 
 
 #include 
@@ -584,7 +585,7 @@ static sal_uInt32 checkConstValue(Options_Impl const & 
options,
 }
 break;
 case RT_TYPE_FLOAT:
-if (constValue1.m_value.aFloat != constValue2.m_value.aFloat)
+if (!rtl::math::approxEqual(constValue1.m_value.aFloat, 
constValue2.m_value.aFloat))
 {
 if ( options.forceOutput() && !options.unoTypeCheck() )
 {
@@ -596,7 +597,7 @@ static sal_uInt32 checkConstValue(Options_Impl const & 
options,
 }
 break;
 case RT_TYPE_DOUBLE:
-if (constValue1.m_value.aDouble != constValue2.m_value.aDouble)
+if (!rtl::math::approxEqual(constValue1.m_value.aDouble, 
constValue2.m_value.aDouble))
 {
 if ( options.forceOutput() && !options.unoTypeCheck() )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: registry/tools

2013-08-30 Thread Tor Lillqvist
 registry/tools/fileurl.cxx |2 +-
 registry/tools/fileurl.hxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a0d3aa1f50ed158fc0a4d57666f8f9840a81153e
Author: Tor Lillqvist t...@iki.fi
Date:   Fri Aug 30 11:10:49 2013 +0300

WaE: size_t/sal_Int32: possible loss of data

Change-Id: I96849e94196291bd387737aae537139ff4fefeb3

diff --git a/registry/tools/fileurl.cxx b/registry/tools/fileurl.cxx
index 2813ef3..94a2488c 100644
--- a/registry/tools/fileurl.cxx
+++ b/registry/tools/fileurl.cxx
@@ -40,7 +40,7 @@ namespace registry
 namespace tools
 {
 
-OUString convertToFileUrl(char const * filename, size_t length)
+OUString convertToFileUrl(char const * filename, sal_Int32 length)
 {
 OUString const uFileName(filename, length, osl_getThreadTextEncoding());
 if (strncmp(filename, file://, 7) == 0)
diff --git a/registry/tools/fileurl.hxx b/registry/tools/fileurl.hxx
index cec3724..0e7de69 100644
--- a/registry/tools/fileurl.hxx
+++ b/registry/tools/fileurl.hxx
@@ -27,7 +27,7 @@ namespace registry
 namespace tools
 {
 
-OUString convertToFileUrl(char const * filename, size_t length);
+OUString convertToFileUrl(char const * filename, sal_Int32 length);
 
 } // namespace tools
 } // namespace registry
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: registry/tools

2013-02-05 Thread Caolán McNamara
 registry/tools/reg2bin.cxx |   14 ++
 1 file changed, 2 insertions(+), 12 deletions(-)

New commits:
commit df42c435f62528c1b7ae7ca3b8f8d2afa7196045
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Feb 5 10:25:42 2013 +

write double/float via union with unsigned type for strict-aliasing

Change-Id: Ie4dd1d41e5cde27ec5b144ca4b7c97276ff62479
Reviewed-on: https://gerrit.libreoffice.org/1990
Reviewed-by: David Ostrovsky david.ostrov...@gmx.de
Tested-by: David Ostrovsky david.ostrov...@gmx.de

diff --git a/registry/tools/reg2bin.cxx b/registry/tools/reg2bin.cxx
index be8fead..5983b56 100644
--- a/registry/tools/reg2bin.cxx
+++ b/registry/tools/reg2bin.cxx
@@ -1196,6 +1196,7 @@ sal_uInt64 writeMap(
 static_cast sal_uInt32 (j-second.constantValue.l));
 break;
 case CONSTANT_TYPE_UNSIGNED_LONG:
+case CONSTANT_TYPE_FLOAT: //access through union for 
strict-aliasing
 write32(file, j-second.constantValue.ul);
 break;
 case CONSTANT_TYPE_HYPER:
@@ -1204,20 +1205,9 @@ sal_uInt64 writeMap(
 static_cast sal_uInt64 (j-second.constantValue.h));
 break;
 case CONSTANT_TYPE_UNSIGNED_HYPER:
+case CONSTANT_TYPE_DOUBLE: //access through union for 
strict-aliasing
 write64(file, j-second.constantValue.uh);
 break;
-case CONSTANT_TYPE_FLOAT:
-write32(
-file,
-*reinterpret_cast sal_uInt32 const * (
-j-second.constantValue.f));
-break;
-case CONSTANT_TYPE_DOUBLE:
-write64(
-file,
-*reinterpret_cast sal_uInt64 const * (
-j-second.constantValue.d));
-break;
 default:
 std::abort(); // this cannot happen
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: registry/tools

2013-02-04 Thread Norbert Thiebaud
 registry/tools/reg2bin.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 78fc20485df83f5d468184ed8fca6c267446fdf1
Author: Norbert Thiebaud nthieb...@gmail.com
Date:   Mon Feb 4 02:54:33 2013 -0600

WaE unused variable

Change-Id: I36a51ad53e1992a32c59defa8847555caccd035f

diff --git a/registry/tools/reg2bin.cxx b/registry/tools/reg2bin.cxx
index b45580947..be8fead 100644
--- a/registry/tools/reg2bin.cxx
+++ b/registry/tools/reg2bin.cxx
@@ -191,8 +191,10 @@ void insert(
 std::map rtl::OUString, Item  * map)
 {
 assert(map != 0);
-bool b = map-insert(std::make_pair(name, item)).second;
-assert(b);
+if(!map-insert(std::make_pair(name, item)).second)
+{
+assert(false);
+}
 }
 
 typereg::Reader getReader(RegistryKey  key, std::vector char  * buffer) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits