The following issues were found
src/third_party/wiredtiger/test/suite/test_txn21.py
7 issues
Line: 33
Column: 1
# Transactions: smoke test the operation timeout API
#
import wiredtiger, wttest
class test_txn21(wttest.WiredTigerTestCase):
# Connection-level configuration.
def test_operation_timeout_conn(self):
Reported by Pylint.
Line: 1
Column: 1
#!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
Reported by Pylint.
Line: 33
Column: 1
# Transactions: smoke test the operation timeout API
#
import wiredtiger, wttest
class test_txn21(wttest.WiredTigerTestCase):
# Connection-level configuration.
def test_operation_timeout_conn(self):
Reported by Pylint.
Line: 35
Column: 1
import wiredtiger, wttest
class test_txn21(wttest.WiredTigerTestCase):
# Connection-level configuration.
def test_operation_timeout_conn(self):
# Close the automatically opened connection and open one with the timeout configuration.
conn_config = 'operation_timeout_ms=2000'
Reported by Pylint.
Line: 35
Column: 1
import wiredtiger, wttest
class test_txn21(wttest.WiredTigerTestCase):
# Connection-level configuration.
def test_operation_timeout_conn(self):
# Close the automatically opened connection and open one with the timeout configuration.
conn_config = 'operation_timeout_ms=2000'
Reported by Pylint.
Line: 38
Column: 5
class test_txn21(wttest.WiredTigerTestCase):
# Connection-level configuration.
def test_operation_timeout_conn(self):
# Close the automatically opened connection and open one with the timeout configuration.
conn_config = 'operation_timeout_ms=2000'
self.conn.close()
self.conn = wiredtiger.wiredtiger_open(self.home, conn_config)
Reported by Pylint.
Line: 45
Column: 5
self.conn = wiredtiger.wiredtiger_open(self.home, conn_config)
# Transaction-level configuration.
def test_operation_timeout_txn(self):
# Test during begin.
self.session.begin_transaction('operation_timeout_ms=2000')
self.session.rollback_transaction()
# Test during rollback.
Reported by Pylint.
src/third_party/wiredtiger/test/3rdparty/testscenarios-0.4/doc/example.py
7 issues
Line: 18
Column: 1
"""Example TestScenario."""
from testscenarios import TestWithScenarios
scenario1 = ('basic', {'attribute': 'value'})
scenario2 = ('advanced', {'attribute': 'value2'})
Reported by Pylint.
Line: 4
Column: 2
# testscenarios: extensions to python unittest to allow declarative
# dependency injection ('scenarios') by tests.
# Copyright (c) 2009, Robert Collins <robertc@robertcollins.net>
#
# Licensed under either the Apache License, Version 2.0 or the BSD 3-clause
# license at the users choice. A copy of both licenses are available in the
# project source as Apache-2.0 and BSD. You may not use this file except in
# compliance with one of these two licences.
#
Reported by Pylint.
Line: 9
Column: 2
# license at the users choice. A copy of both licenses are available in the
# project source as Apache-2.0 and BSD. You may not use this file except in
# compliance with one of these two licences.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under these licenses is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# license you chose for the specific language governing permissions and
# limitations under that license.
Reported by Pylint.
Line: 25
Column: 1
scenario2 = ('advanced', {'attribute': 'value2'})
class SampleWithScenarios(TestWithScenarios):
scenarios = [scenario1, scenario2]
def test_demo(self):
self.assertIsInstance(self.attribute, str)
Reported by Pylint.
Line: 25
Column: 1
scenario2 = ('advanced', {'attribute': 'value2'})
class SampleWithScenarios(TestWithScenarios):
scenarios = [scenario1, scenario2]
def test_demo(self):
self.assertIsInstance(self.attribute, str)
Reported by Pylint.
Line: 28
Column: 1
class SampleWithScenarios(TestWithScenarios):
scenarios = [scenario1, scenario2]
def test_demo(self):
self.assertIsInstance(self.attribute, str)
Reported by Pylint.
Line: 29
Column: 5
scenarios = [scenario1, scenario2]
def test_demo(self):
self.assertIsInstance(self.attribute, str)
Reported by Pylint.
src/third_party/wiredtiger/test/3rdparty/testscenarios-0.4/lib/testscenarios/__init__.py
7 issues
Line: 47
Column: 5
'TestWithScenarios',
'WithScenarios',
'apply_scenario',
'apply_scenarios',
'generate_scenarios',
'load_tests_apply_scenarios',
'multiply_scenarios',
'per_module_scenarios',
]
Reported by Pylint.
Line: 72
Column: 32
return testscenarios.tests.test_suite()
def load_tests(standard_tests, module, loader):
standard_tests.addTests(loader.loadTestsFromNames(["testscenarios.tests"]))
return standard_tests
Reported by Pylint.
Line: 5
Column: 2
# dependency injection ('scenarios') by tests.
#
# Copyright (c) 2009, Robert Collins <robertc@robertcollins.net>
#
# Licensed under either the Apache License, Version 2.0 or the BSD 3-clause
# license at the users choice. A copy of both licenses are available in the
# project source as Apache-2.0 and BSD. You may not use this file except in
# compliance with one of these two licences.
#
Reported by Pylint.
Line: 10
Column: 2
# license at the users choice. A copy of both licenses are available in the
# project source as Apache-2.0 and BSD. You may not use this file except in
# compliance with one of these two licences.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under these licenses is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# license you chose for the specific language governing permissions and
# limitations under that license.
Reported by Pylint.
Line: 67
Column: 1
from testscenarios.testcase import TestWithScenarios, WithScenarios
def test_suite():
import testscenarios.tests
return testscenarios.tests.test_suite()
def load_tests(standard_tests, module, loader):
Reported by Pylint.
Line: 68
Column: 5
def test_suite():
import testscenarios.tests
return testscenarios.tests.test_suite()
def load_tests(standard_tests, module, loader):
standard_tests.addTests(loader.loadTestsFromNames(["testscenarios.tests"]))
Reported by Pylint.
Line: 72
Column: 1
return testscenarios.tests.test_suite()
def load_tests(standard_tests, module, loader):
standard_tests.addTests(loader.loadTestsFromNames(["testscenarios.tests"]))
return standard_tests
Reported by Pylint.
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/hplink.py
7 issues
Line: 40
Column: 1
import SCons.Util
from . import link
ccLinker = None
# search for the acc compiler and linker front end
Reported by Pylint.
Line: 53
Column: 5
# (IOError) or isn't readable (OSError) is okay.
dirs = []
for dir in dirs:
linker = '/opt/' + dir + '/bin/aCC'
if os.path.exists(linker):
ccLinker = linker
break
Reported by Pylint.
Line: 70
Column: 12
env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -b')
env['SHLIBSUFFIX'] = '.sl'
def exists(env):
return ccLinker
# Local Variables:
# tab-width:4
# indent-tabs-mode:nil
Reported by Pylint.
Line: 33
Column: 1
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
__revision__ = "src/engine/SCons/Tool/hplink.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import os
import os.path
import SCons.Util
Reported by Pylint.
Line: 42
Column: 1
from . import link
ccLinker = None
# search for the acc compiler and linker front end
try:
dirs = os.listdir('/opt')
Reported by Pylint.
Line: 65
Column: 1
an Environment.
"""
link.generate(env)
env['LINKFLAGS'] = SCons.Util.CLVar('-Wl,+s -Wl,+vnocompatwarnings')
env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -b')
env['SHLIBSUFFIX'] = '.sl'
def exists(env):
Reported by Pylint.
Line: 70
Column: 1
env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -b')
env['SHLIBSUFFIX'] = '.sl'
def exists(env):
return ccLinker
# Local Variables:
# tab-width:4
# indent-tabs-mode:nil
Reported by Pylint.
src/third_party/boost/boost/random/detail/seed_impl.hpp
7 issues
Line: 33
Column: 11
CWE codes:
327
Suggestion:
Use a more secure technique for acquiring random values
#include <boost/random/detail/disable_warnings.hpp>
namespace boost {
namespace random {
namespace detail {
// finds the seed type of an engine, given its
// result_type. If the result_type is integral
// the seed type is the same. If the result_type
Reported by FlawFinder.
Line: 135
Column: 29
CWE codes:
327
Suggestion:
Use a more secure technique for acquiring random values
void generate_from_int(Engine& eng, Iter begin, Iter end)
{
typedef typename Engine::result_type IntType;
typedef typename boost::random::traits::make_unsigned<IntType>::type unsigned_type;
int remaining_bits = 0;
boost::uint_least32_t saved_bits = 0;
unsigned_type range = boost::random::detail::subtract<IntType>()((eng.max)(), (eng.min)());
int bits =
Reported by FlawFinder.
Line: 138
Column: 34
CWE codes:
327
Suggestion:
Use a more secure technique for acquiring random values
typedef typename boost::random::traits::make_unsigned<IntType>::type unsigned_type;
int remaining_bits = 0;
boost::uint_least32_t saved_bits = 0;
unsigned_type range = boost::random::detail::subtract<IntType>()((eng.max)(), (eng.min)());
int bits =
(range == (std::numeric_limits<unsigned_type>::max)()) ?
std::numeric_limits<unsigned_type>::digits :
detail::integer_log2(range + 1);
Reported by FlawFinder.
Line: 160
Column: 26
CWE codes:
327
Suggestion:
Use a more secure technique for acquiring random values
while(true) {
unsigned_type val;
do {
val = boost::random::detail::subtract<IntType>()(eng(), (eng.min)());
} while(limit != range && val > limit);
val &= mask;
int available_bits = bits;
if(available_bits == 32) {
*begin++ = static_cast<boost::uint_least32_t>(val) & 0xFFFFFFFFu;
Reported by FlawFinder.
Line: 219
Column: 59
CWE codes:
327
Suggestion:
Use a more secure technique for acquiring random values
template<class Engine, class Iter>
void generate(Engine& eng, Iter first, Iter last)
{
return detail::generate_impl(eng, first, last, boost::random::traits::is_integral<typename Engine::result_type>());
}
template<class IntType, IntType m, class SeedSeq>
Reported by FlawFinder.
Line: 295
Column: 43
CWE codes:
327
Suggestion:
Use a more secure technique for acquiring random values
template<int w, std::size_t n, class SeedSeq, class IntType>
inline void seed_array_int(SeedSeq& seq, IntType (&x)[n])
{
seed_array_int_impl<w>(seq, x, boost::random::traits::is_signed<IntType>());
}
template<int w, std::size_t n, class Iter, class UIntType>
void fill_array_int_impl(Iter& first, Iter last, UIntType (&x)[n])
{
Reported by FlawFinder.
Line: 330
Column: 51
CWE codes:
327
Suggestion:
Use a more secure technique for acquiring random values
template<int w, std::size_t n, class Iter, class IntType>
inline void fill_array_int(Iter& first, Iter last, IntType (&x)[n])
{
fill_array_int_impl<w>(first, last, x, boost::random::traits::is_signed<IntType>());
}
template<int w, std::size_t n, class RealType>
void seed_array_real_impl(const boost::uint_least32_t* storage, RealType (&x)[n])
{
Reported by FlawFinder.
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/f77.py
7 issues
Line: 36
Column: 1
__revision__ = "src/engine/SCons/Tool/f77.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import SCons.Defaults
import SCons.Scanner.Fortran
import SCons.Tool
import SCons.Util
from SCons.Tool.FortranCommon import add_all_to_env, add_f77_to_env
Reported by Pylint.
Line: 37
Column: 1
__revision__ = "src/engine/SCons/Tool/f77.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import SCons.Defaults
import SCons.Scanner.Fortran
import SCons.Tool
import SCons.Util
from SCons.Tool.FortranCommon import add_all_to_env, add_f77_to_env
compilers = ['f77']
Reported by Pylint.
Line: 38
Column: 1
import SCons.Defaults
import SCons.Scanner.Fortran
import SCons.Tool
import SCons.Util
from SCons.Tool.FortranCommon import add_all_to_env, add_f77_to_env
compilers = ['f77']
Reported by Pylint.
Line: 39
Column: 1
import SCons.Defaults
import SCons.Scanner.Fortran
import SCons.Tool
import SCons.Util
from SCons.Tool.FortranCommon import add_all_to_env, add_f77_to_env
compilers = ['f77']
def generate(env):
Reported by Pylint.
Line: 34
Column: 1
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
__revision__ = "src/engine/SCons/Tool/f77.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import SCons.Defaults
import SCons.Scanner.Fortran
import SCons.Tool
import SCons.Util
Reported by Pylint.
Line: 44
Column: 1
compilers = ['f77']
def generate(env):
add_all_to_env(env)
add_f77_to_env(env)
fcomp = env.Detect(compilers) or 'f77'
env['F77'] = fcomp
Reported by Pylint.
Line: 55
Column: 1
env['FORTRAN'] = fcomp
env['SHFORTRAN'] = fcomp
def exists(env):
return env.Detect(compilers)
# Local Variables:
# tab-width:4
# indent-tabs-mode:nil
Reported by Pylint.
src/third_party/wiredtiger/test/3rdparty/python-subunit-0.0.16/python/subunit/tests/test_filters.py
7 issues
Line: 20
Column: 1
import sys
from tempfile import NamedTemporaryFile
from testtools import TestCase
from subunit.filters import find_stream
class TestFindStream(TestCase):
Reported by Pylint.
Line: 17
Column: 1
# limitations under that license.
#
import sys
from tempfile import NamedTemporaryFile
from testtools import TestCase
from subunit.filters import find_stream
Reported by Pylint.
Line: 1
Column: 1
#
# subunit: extensions to Python unittest to get test results from subprocesses.
# Copyright (C) 2013 Robert Collins <robertc@robertcollins.net>
#
# Licensed under either the Apache License, Version 2.0 or the BSD 3-clause
# license at the users choice. A copy of both licenses are available in the
# project source as Apache-2.0 and BSD. You may not use this file except in
# compliance with one of these two licences.
#
Reported by Pylint.
Line: 25
Column: 1
from subunit.filters import find_stream
class TestFindStream(TestCase):
def test_no_argv(self):
self.assertEqual('foo', find_stream('foo', []))
def test_opens_file(self):
Reported by Pylint.
Line: 27
Column: 5
class TestFindStream(TestCase):
def test_no_argv(self):
self.assertEqual('foo', find_stream('foo', []))
def test_opens_file(self):
f = NamedTemporaryFile()
f.write(b'foo')
Reported by Pylint.
Line: 30
Column: 5
def test_no_argv(self):
self.assertEqual('foo', find_stream('foo', []))
def test_opens_file(self):
f = NamedTemporaryFile()
f.write(b'foo')
f.flush()
stream = find_stream('bar', [f.name])
self.assertEqual(b'foo', stream.read())
Reported by Pylint.
Line: 31
Column: 9
self.assertEqual('foo', find_stream('foo', []))
def test_opens_file(self):
f = NamedTemporaryFile()
f.write(b'foo')
f.flush()
stream = find_stream('bar', [f.name])
self.assertEqual(b'foo', stream.read())
Reported by Pylint.
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/dvi.py
7 issues
Line: 41
Column: 9
try:
env['BUILDERS']['DVI']
except KeyError:
global DVIBuilder
if DVIBuilder is None:
# The suffix is hard-coded to '.dvi', not configurable via a
# construction variable like $DVISUFFIX, because the output
# file name is hard-coded within TeX.
Reported by Pylint.
Line: 55
Column: 12
env['BUILDERS']['DVI'] = DVIBuilder
def exists(env):
# This only puts a skeleton Builder in place, so if someone
# references this Tool directly, it's always "available."
return 1
# Local Variables:
Reported by Pylint.
Line: 30
Column: 1
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
__revision__ = "src/engine/SCons/Tool/dvi.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import SCons.Builder
import SCons.Tool
DVIBuilder = None
Reported by Pylint.
Line: 35
Column: 1
import SCons.Builder
import SCons.Tool
DVIBuilder = None
def generate(env):
try:
env['BUILDERS']['DVI']
except KeyError:
Reported by Pylint.
Line: 37
Column: 1
DVIBuilder = None
def generate(env):
try:
env['BUILDERS']['DVI']
except KeyError:
global DVIBuilder
Reported by Pylint.
Line: 41
Column: 9
try:
env['BUILDERS']['DVI']
except KeyError:
global DVIBuilder
if DVIBuilder is None:
# The suffix is hard-coded to '.dvi', not configurable via a
# construction variable like $DVISUFFIX, because the output
# file name is hard-coded within TeX.
Reported by Pylint.
Line: 55
Column: 1
env['BUILDERS']['DVI'] = DVIBuilder
def exists(env):
# This only puts a skeleton Builder in place, so if someone
# references this Tool directly, it's always "available."
return 1
# Local Variables:
Reported by Pylint.
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/cvf.py
7 issues
Line: 32
Column: 1
__revision__ = "src/engine/SCons/Tool/cvf.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
from . import fortran
compilers = ['f90']
def generate(env):
"""Add Builders and construction variables for compaq visual fortran to an Environment."""
Reported by Pylint.
Line: 30
Column: 1
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
__revision__ = "src/engine/SCons/Tool/cvf.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
from . import fortran
compilers = ['f90']
Reported by Pylint.
Line: 42
Column: 1
fortran.generate(env)
env['FORTRAN'] = 'f90'
env['FORTRANCOM'] = '$FORTRAN $FORTRANFLAGS $_FORTRANMODFLAG $_FORTRANINCFLAGS /compile_only ${SOURCES.windows} /object:${TARGET.windows}'
env['FORTRANPPCOM'] = '$FORTRAN $FORTRANFLAGS $CPPFLAGS $_CPPDEFFLAGS $_FORTRANMODFLAG $_FORTRANINCFLAGS /compile_only ${SOURCES.windows} /object:${TARGET.windows}'
env['SHFORTRANCOM'] = '$SHFORTRAN $SHFORTRANFLAGS $_FORTRANMODFLAG $_FORTRANINCFLAGS /compile_only ${SOURCES.windows} /object:${TARGET.windows}'
env['SHFORTRANPPCOM'] = '$SHFORTRAN $SHFORTRANFLAGS $CPPFLAGS $_CPPDEFFLAGS $_FORTRANMODFLAG $_FORTRANINCFLAGS /compile_only ${SOURCES.windows} /object:${TARGET.windows}'
env['OBJSUFFIX'] = '.obj'
env['FORTRANMODDIR'] = '${TARGET.dir}'
Reported by Pylint.
Line: 43
Column: 1
env['FORTRAN'] = 'f90'
env['FORTRANCOM'] = '$FORTRAN $FORTRANFLAGS $_FORTRANMODFLAG $_FORTRANINCFLAGS /compile_only ${SOURCES.windows} /object:${TARGET.windows}'
env['FORTRANPPCOM'] = '$FORTRAN $FORTRANFLAGS $CPPFLAGS $_CPPDEFFLAGS $_FORTRANMODFLAG $_FORTRANINCFLAGS /compile_only ${SOURCES.windows} /object:${TARGET.windows}'
env['SHFORTRANCOM'] = '$SHFORTRAN $SHFORTRANFLAGS $_FORTRANMODFLAG $_FORTRANINCFLAGS /compile_only ${SOURCES.windows} /object:${TARGET.windows}'
env['SHFORTRANPPCOM'] = '$SHFORTRAN $SHFORTRANFLAGS $CPPFLAGS $_CPPDEFFLAGS $_FORTRANMODFLAG $_FORTRANINCFLAGS /compile_only ${SOURCES.windows} /object:${TARGET.windows}'
env['OBJSUFFIX'] = '.obj'
env['FORTRANMODDIR'] = '${TARGET.dir}'
env['FORTRANMODDIRPREFIX'] = '/module:'
Reported by Pylint.
Line: 44
Column: 1
env['FORTRAN'] = 'f90'
env['FORTRANCOM'] = '$FORTRAN $FORTRANFLAGS $_FORTRANMODFLAG $_FORTRANINCFLAGS /compile_only ${SOURCES.windows} /object:${TARGET.windows}'
env['FORTRANPPCOM'] = '$FORTRAN $FORTRANFLAGS $CPPFLAGS $_CPPDEFFLAGS $_FORTRANMODFLAG $_FORTRANINCFLAGS /compile_only ${SOURCES.windows} /object:${TARGET.windows}'
env['SHFORTRANCOM'] = '$SHFORTRAN $SHFORTRANFLAGS $_FORTRANMODFLAG $_FORTRANINCFLAGS /compile_only ${SOURCES.windows} /object:${TARGET.windows}'
env['SHFORTRANPPCOM'] = '$SHFORTRAN $SHFORTRANFLAGS $CPPFLAGS $_CPPDEFFLAGS $_FORTRANMODFLAG $_FORTRANINCFLAGS /compile_only ${SOURCES.windows} /object:${TARGET.windows}'
env['OBJSUFFIX'] = '.obj'
env['FORTRANMODDIR'] = '${TARGET.dir}'
env['FORTRANMODDIRPREFIX'] = '/module:'
env['FORTRANMODDIRSUFFIX'] = ''
Reported by Pylint.
Line: 45
Column: 1
env['FORTRANCOM'] = '$FORTRAN $FORTRANFLAGS $_FORTRANMODFLAG $_FORTRANINCFLAGS /compile_only ${SOURCES.windows} /object:${TARGET.windows}'
env['FORTRANPPCOM'] = '$FORTRAN $FORTRANFLAGS $CPPFLAGS $_CPPDEFFLAGS $_FORTRANMODFLAG $_FORTRANINCFLAGS /compile_only ${SOURCES.windows} /object:${TARGET.windows}'
env['SHFORTRANCOM'] = '$SHFORTRAN $SHFORTRANFLAGS $_FORTRANMODFLAG $_FORTRANINCFLAGS /compile_only ${SOURCES.windows} /object:${TARGET.windows}'
env['SHFORTRANPPCOM'] = '$SHFORTRAN $SHFORTRANFLAGS $CPPFLAGS $_CPPDEFFLAGS $_FORTRANMODFLAG $_FORTRANINCFLAGS /compile_only ${SOURCES.windows} /object:${TARGET.windows}'
env['OBJSUFFIX'] = '.obj'
env['FORTRANMODDIR'] = '${TARGET.dir}'
env['FORTRANMODDIRPREFIX'] = '/module:'
env['FORTRANMODDIRSUFFIX'] = ''
Reported by Pylint.
Line: 51
Column: 1
env['FORTRANMODDIRPREFIX'] = '/module:'
env['FORTRANMODDIRSUFFIX'] = ''
def exists(env):
return env.Detect(compilers)
# Local Variables:
# tab-width:4
# indent-tabs-mode:nil
Reported by Pylint.
src/third_party/boost/boost/log/sinks/syslog_backend.hpp
7 issues
Line: 53
Column: 11
CWE codes:
134
Suggestion:
Use a constant format string for syslog
v6
};
namespace syslog {
//! The enumeration defined the possible implementation types for the syslog backend
enum impl_types
{
#ifdef BOOST_LOG_USE_NATIVE_SYSLOG
Reported by FlawFinder.
Line: 165
Column: 46
CWE codes:
134
Suggestion:
Use a constant format string for syslog
typedef base_type::string_type string_type;
//! Syslog severity level mapper type
typedef boost::log::aux::light_function< syslog::level (record_view const&) > severity_mapper_type;
private:
//! Pointer to the implementation
implementation* m_pImpl;
Reported by FlawFinder.
Line: 264
Column: 39
CWE codes:
134
Suggestion:
Use a constant format string for syslog
void construct(ArgsT const& args)
{
construct(
args[keywords::facility | syslog::user],
#if !defined(BOOST_LOG_NO_ASIO)
args[keywords::use_impl | syslog::udp_socket_based],
#else
args[keywords::use_impl | syslog::native],
#endif
Reported by FlawFinder.
Line: 266
Column: 39
CWE codes:
134
Suggestion:
Use a constant format string for syslog
construct(
args[keywords::facility | syslog::user],
#if !defined(BOOST_LOG_NO_ASIO)
args[keywords::use_impl | syslog::udp_socket_based],
#else
args[keywords::use_impl | syslog::native],
#endif
args[keywords::ip_version | v4],
args[keywords::ident | std::string()]);
Reported by FlawFinder.
Line: 268
Column: 39
CWE codes:
134
Suggestion:
Use a constant format string for syslog
#if !defined(BOOST_LOG_NO_ASIO)
args[keywords::use_impl | syslog::udp_socket_based],
#else
args[keywords::use_impl | syslog::native],
#endif
args[keywords::ip_version | v4],
args[keywords::ident | std::string()]);
}
BOOST_LOG_API void construct(
Reported by FlawFinder.
Line: 274
Column: 36
CWE codes:
134
Suggestion:
Use a constant format string for syslog
args[keywords::ident | std::string()]);
}
BOOST_LOG_API void construct(
syslog::facility facility, syslog::impl_types use_impl, ip_versions ip_version, std::string const& ident);
#endif // BOOST_LOG_DOXYGEN_PASS
};
} // namespace sinks
Reported by FlawFinder.
Line: 274
Column: 9
CWE codes:
134
Suggestion:
Use a constant format string for syslog
args[keywords::ident | std::string()]);
}
BOOST_LOG_API void construct(
syslog::facility facility, syslog::impl_types use_impl, ip_versions ip_version, std::string const& ident);
#endif // BOOST_LOG_DOXYGEN_PASS
};
} // namespace sinks
Reported by FlawFinder.