diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-01-09 15:41:25 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-01-09 15:41:25 +0100 |
commit | 387a035d749ff7f00beca82f83e7aa5d8c5e9fcd (patch) | |
tree | e385741d24f439975d66ffae1331f4f31cd1cc95 /sal | |
parent | 2f3bc785e675b40003b06f549a00775322f0b7fd (diff) |
New loplugin:externvar: sal
Change-Id: Iefc33784f21e7a0b88c8d6308618926e38ab8554
Diffstat (limited to 'sal')
-rw-r--r-- | sal/inc/salusesyslog.hxx | 23 | ||||
-rw-r--r-- | sal/osl/all/log.cxx | 1 | ||||
-rw-r--r-- | sal/osl/unx/salinit.cxx | 3 | ||||
-rw-r--r-- | sal/qa/osl/file/osl_File.cxx | 2 | ||||
-rw-r--r-- | sal/qa/rtl/strings/test_ostring_concat.cxx | 3 | ||||
-rw-r--r-- | sal/qa/rtl/strings/test_ostring_stringliterals.cxx | 8 | ||||
-rw-r--r-- | sal/qa/rtl/strings/test_oustring_stringliterals.cxx | 7 |
7 files changed, 35 insertions, 12 deletions
diff --git a/sal/inc/salusesyslog.hxx b/sal/inc/salusesyslog.hxx new file mode 100644 index 000000000000..ae1c14a886cb --- /dev/null +++ b/sal/inc/salusesyslog.hxx @@ -0,0 +1,23 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_SAL_INC_SALUSESYSLOG_HXX +#define INCLUDED_SAL_INC_SALUSESYSLOG_HXX + +#include <sal/config.h> + +#include <config_global.h> + +#if HAVE_SYSLOG_H +extern bool sal_use_syslog; +#endif + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx index b400e43ab164..23f45cdb4875 100644 --- a/sal/osl/all/log.cxx +++ b/sal/osl/all/log.cxx @@ -27,6 +27,7 @@ #include "sal/log.hxx" #include "sal/types.h" #include "misc.hxx" +#include "salusesyslog.hxx" #if defined ANDROID #include <android/log.h> diff --git a/sal/osl/unx/salinit.cxx b/sal/osl/unx/salinit.cxx index da7ede593404..fdde9e84980c 100644 --- a/sal/osl/unx/salinit.cxx +++ b/sal/osl/unx/salinit.cxx @@ -33,12 +33,11 @@ #include "sal/types.h" #include <saltime.hxx> +#include <salusesyslog.hxx> #if HAVE_SYSLOG_H #include <string.h> #include <syslog.h> -// from sal/osl/all/log.cxx: -extern bool sal_use_syslog; #endif extern "C" { diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 1f8841c129f0..ae4243b4b25d 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -5090,6 +5090,6 @@ class GlobalObject } }; -GlobalObject theGlobalObject; +static GlobalObject theGlobalObject; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/qa/rtl/strings/test_ostring_concat.cxx b/sal/qa/rtl/strings/test_ostring_concat.cxx index 0326df1aaccd..b2adc17272d6 100644 --- a/sal/qa/rtl/strings/test_ostring_concat.cxx +++ b/sal/qa/rtl/strings/test_ostring_concat.cxx @@ -9,7 +9,6 @@ // activate support for detecting errors instead of getting compile errors #define RTL_STRING_UNITTEST_CONCAT -bool rtl_string_unittest_invalid_concat = false; #include <sal/types.h> #include <cppunit/TestFixture.h> @@ -22,6 +21,8 @@ bool rtl_string_unittest_invalid_concat = false; #include <typeinfo> +bool rtl_string_unittest_invalid_concat = false; + using namespace rtl; namespace std diff --git a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx index 2b08581d0712..9d81a90ac6a9 100644 --- a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx +++ b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx @@ -9,10 +9,6 @@ // activate the extra needed ctor #define RTL_STRING_UNITTEST -bool rtl_string_unittest_const_literal; -bool rtl_string_unittest_invalid_conversion; -bool rtl_string_unittest_const_literal_function; -bool rtl_string_unittest_non_const_literal_function; #include <sal/types.h> #include <cppunit/TestFixture.h> @@ -21,6 +17,10 @@ bool rtl_string_unittest_non_const_literal_function; #include "rtl/string.hxx" #include "rtl/strbuf.hxx" +bool rtl_string_unittest_const_literal; +bool rtl_string_unittest_const_literal_function; +static bool rtl_string_unittest_non_const_literal_function; + namespace test { namespace ostring { class StringLiterals: public CppUnit::TestFixture diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx index 3c0b996627dc..094a779fc2f1 100644 --- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx +++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx @@ -9,10 +9,6 @@ // activate the extra needed ctor #define RTL_STRING_UNITTEST -extern bool rtl_string_unittest_const_literal; -extern bool rtl_string_unittest_invalid_conversion; -extern bool rtl_string_unittest_const_literal_function; -extern bool rtl_string_unittest_non_const_literal_function; #include <sal/config.h> @@ -26,6 +22,9 @@ extern bool rtl_string_unittest_non_const_literal_function; #include "rtl/ustring.hxx" #include "rtl/ustrbuf.hxx" +extern bool rtl_string_unittest_const_literal; +bool rtl_string_unittest_invalid_conversion; + namespace test { namespace oustring { class StringLiterals: public CppUnit::TestFixture |