History log of /openbmc/phosphor-led-sysfs/ (Results 51 – 75 of 133)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
dce1e20506-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

physical: Fix bugprone-narrowing-conversions

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.cpp:138:14: error: narrowing conversion from 'int' to signed type '__gnu_cxx::__alloc_t

physical: Fix bugprone-narrowing-conversions

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.cpp:138:14: error: narrowing conversion from 'int' to signed type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' (aka 'char') is implementation-defined [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]
tmp[0] = toupper(tmp[0]);
^
```

Change-Id: I58c9a47008272b856427419557dc3e592936b5eb
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

826ba7b605-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

physical: Fix readability-braces-around-statements

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.cpp:135:25: error: statement should be inside braces [readability-braces-around-s

physical: Fix readability-braces-around-statements

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.cpp:135:25: error: statement should be inside braces [readability-braces-around-statements,-warnings-as-errors]
if (!color.length())
^
{
```

Change-Id: I7ac2e39c4a1b32e08df0161adfb305c25b968873
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

263c056105-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

physical: Fix readability-implicit-bool-conversion

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.cpp:135:10: error: implicit conversion 'std::basic_string<char>::size_type' (aka

physical: Fix readability-implicit-bool-conversion

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.cpp:135:10: error: implicit conversion 'std::basic_string<char>::size_type' (aka 'unsigned long') -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
if (!color.length())
~^
== 0u
```

Change-Id: I0bb5e13bec6fbe8b21a89af695ca8f9535e3cdab
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

7782f0d605-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

physical: Fix bugprone-narrowing-conversions

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.cpp:120:20: error: narrowing conversion from 'double' to 'unsigned long' [bugprone-narr

physical: Fix bugprone-narrowing-conversions

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.cpp:120:20: error: narrowing conversion from 'double' to 'unsigned long' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]
led.setDelayOn(dutyOn * factor);
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.cpp:121:21: error: narrowing conversion from 'double' to 'unsigned long' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions,-warnings-as-errors]
led.setDelayOff((100 - dutyOn) * factor);
^
```

Change-Id: Ic7dbacac3b636a209a743063182d324165bbbaa1
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

305e3b7605-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

physical: Fix readability-redundant-control-flow

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.cpp:57:5: error: redundant return statement at the end of a function with a void re

physical: Fix readability-redundant-control-flow

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.cpp:57:5: error: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow,-warnings-as-errors]
return;
^~~~~~~
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.cpp:100:5: error: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow,-warnings-as-errors]
return;
~~~~^~~~~~~
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.cpp:123:5: error: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow,-warnings-as-errors]
return;
~~~~^~~~~~~
```

Change-Id: I58bf70aa3d565a0449e4c0a85b271512a0cf9742
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

e3719f4405-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

physical: Fix readability-implicit-bool-conversion

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.cpp:46:13: error: implicit conversion 'unsigned long' -> bool [readability-implic

physical: Fix readability-implicit-bool-conversion

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.cpp:46:13: error: implicit conversion 'unsigned long' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
if (brightness && assert)
^
( != 0u)
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../physical.cpp:46:27: error: implicit conversion 'unsigned long' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
if (brightness && assert)
^
( != 0u)
```

Change-Id: I556d7d24cd1bd6372285d58c78fd1b17339b2ebe
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

cb14f2d005-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

controller: Work around clang-tidy issue with boost

See https://bugs.llvm.org/show_bug.cgi?id=41141

```
../subprojects/boost_1_81_0/boost/algorithm/string/detail/classification.hpp:137:25: error: P

controller: Work around clang-tidy issue with boost

See https://bugs.llvm.org/show_bug.cgi?id=41141

```
../subprojects/boost_1_81_0/boost/algorithm/string/detail/classification.hpp:137:25: error: Potential memory leak [clang-analyzer-cplusplus.NewDeleteLeaks,-warnings-as-errors]
if(!use_fixed_storage(m_Size) && m_Storage.m_dynSet!=0)
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:100:9: note: Assuming the condition is false
if (options["path"].empty())
^~~~~~~~~~~~~~~~~~~~~~~
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:100:5: note: Taking false branch
if (options["path"].empty())
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:135:5: note: Calling 'getLedDescr'
getLedDescr(name, ledDescr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:56:5: note: Calling 'split<std::vector<std::basic_string<char>>, const std::basic_string<char> &, boost::algorithm::detail::is_any_ofF<char>>'
boost::split(words, name, boost::is_any_of(":"));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../subprojects/boost_1_81_0/boost/algorithm/string/split.hpp:161:17: note: Calling 'token_finder<boost::algorithm::detail::is_any_ofF<char>>'
::boost::algorithm::token_finder( Pred, eCompress ) );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../subprojects/boost_1_81_0/boost/algorithm/string/finder.hpp:219:20: note: Calling constructor for 'token_finderF<boost::algorithm::detail::is_any_ofF<char>>'
return detail::token_finderF<PredicateT>( Pred, eCompress );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../subprojects/boost_1_81_0/boost/algorithm/string/detail/finder.hpp:554:25: note: Calling copy constructor for 'is_any_ofF<char>'
m_Pred(Pred), m_eCompress(eCompress) {}
^~~~~~~~~~~~
../subprojects/boost_1_81_0/boost/algorithm/string/detail/classification.hpp:116:21: note: Taking false branch
if(use_fixed_storage(m_Size))
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../subprojects/boost_1_81_0/boost/algorithm/string/detail/classification.hpp:125:44: note: Memory is allocated
m_Storage.m_dynSet=new set_value_type[m_Size];
^~~
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../subprojects/boost_1_81_0/boost/algorithm/string/detail/finder.hpp:554:25: note: Returning from copy constructor for 'is_any_ofF<char>'
m_Pred(Pred), m_eCompress(eCompress) {}
^~~~~~~~~~~~
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../subprojects/boost_1_81_0/boost/algorithm/string/finder.hpp:219:20: note: Returning from constructor for 'token_finderF<boost::algorithm::detail::is_any_ofF<char>>'
return detail::token_finderF<PredicateT>( Pred, eCompress );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../subprojects/boost_1_81_0/boost/algorithm/string/split.hpp:161:17: note: Returned allocated memory
::boost::algorithm::token_finder( Pred, eCompress ) );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../subprojects/boost_1_81_0/boost/algorithm/string/split.hpp:161:51: note: Calling '~is_any_ofF'
::boost::algorithm::token_finder( Pred, eCompress ) );
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../subprojects/boost_1_81_0/boost/algorithm/string/detail/classification.hpp:137:25: note: Potential memory leak
if(!use_fixed_storage(m_Size) && m_Storage.m_dynSet!=0)
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../subprojects/boost_1_81_0/boost/algorithm/string/detail/classification.hpp:141:17: error: Potential memory leak [clang-an
alyzer-cplusplus.NewDeleteLeaks,-warnings-as-errors]
}
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:100:9: note: Assuming the condition is false
if (options["path"].empty())
^~~~~~~~~~~~~~~~~~~~~~~
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:100:5: note: Taking false branch
if (options["path"].empty())
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:135:5: note: Calling 'getLedDescr'
getLedDescr(name, ledDescr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:56:5: note: Calling 'split<std::vector<std::basic_string<char>>, const std::basic_string<char> &, boost::algorithm::detail::is_any_ofF<char>>'
boost::split(words, name, boost::is_any_of(":"));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../subprojects/boost_1_81_0/boost/algorithm/string/split.hpp:161:17: note: Calling 'token_finder<boost::algorithm::detail::is_any_ofF<char>>'
::boost::algorithm::token_finder( Pred, eCompress ) );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../subprojects/boost_1_81_0/boost/algorithm/string/finder.hpp:219:55: note: Calling copy constructor for 'is_any_ofF<char>'
return detail::token_finderF<PredicateT>( Pred, eCompress );
^~~~
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../subprojects/boost_1_81_0/boost/algorithm/string/detail/classification.hpp:116:21: note: Taking false branch
if(use_fixed_storage(m_Size))
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../subprojects/boost_1_81_0/boost/algorithm/string/detail/classification.hpp:125:44: note: Memory is allocated
m_Storage.m_dynSet=new set_value_type[m_Size];
^~~
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../subprojects/boost_1_81_0/boost/algorithm/string/finder.hpp:219:55: note: Returning from copy constructor for 'is_any_ofF<char>'
return detail::token_finderF<PredicateT>( Pred, eCompress );
^~~~
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../subprojects/boost_1_81_0/boost/algorithm/string/finder.hpp:219:55: note: Calling '~is_any_ofF'
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../subprojects/boost_1_81_0/boost/algorithm/string/detail/classification.hpp:137:51: note: Left side of '&&' is false
if(!use_fixed_storage(m_Size) && m_Storage.m_dynSet!=0)
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../subprojects/boost_1_81_0/boost/algorithm/string/detail/classification.hpp:141:17: note: Potential memory leak
}
^
138378 warnings generated.
```

Change-Id: Ie7e36805f91971f6057ea1e6e143fcf4dffcac65
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

b754cf0205-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

controller: Fix bugprone-unused-raii

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:143:5: error: object destroyed immediately after creation; did you mean to name the objec

controller: Fix bugprone-unused-raii

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:143:5: error: object destroyed immediately after creation; did you mean to name the object? [bugprone-unused-raii,-warnings-as-errors]
sdbusplus::server::manager_t(bus, objPath.c_str());
^
give_me_a_name
```

Change-Id: I4225f71874dbabfc315c4ba5d252d0d075868a68
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

444ee36b05-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

controller: Fix performance-move-const-arg

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:97:17: error: std::move of the const expression has no effect; remove std::move() [

controller: Fix performance-move-const-arg

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:97:17: error: std::move of the const expression has no effect; remove std::move() [performance-move-const-arg,-warnings-as-errors]
auto path = std::move((options)["path"]);
^~~~~~~~~~ ~
```

Change-Id: I5a26c0b9fa7fcd3d07a2495eeeb5cd0a1e089ceb
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

e2dc00a605-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

controller: Fix readability-identifier-naming

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:85:27: error: invalid case style for variable 'BUSNAME' [readability-identifier-

controller: Fix readability-identifier-naming

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:85:27: error: invalid case style for variable 'BUSNAME' [readability-identifier-naming,-warnings-as-errors]
static constexpr auto BUSNAME = "xyz.openbmc_project.LED.Controller";
^~~~~~~
busname
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:86:27: error: invalid case style for variable 'OBJPATH' [readability-identifier-naming,-warnings-as-errors]
static constexpr auto OBJPATH = "/xyz/openbmc_project/led/physical";
^~~~~~~
objpath
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:87:27: error: invalid case style for variable 'DEVPATH' [readability-identifier-naming,-warnings-as-errors]
static constexpr auto DEVPATH = "/sys/class/leds/";
^~~~~~~
devpath
```

Change-Id: I0ea55045d60704ff5744481fdb907cdebda80368
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

20aef9a305-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

controller: Fix readability-braces-around-statements

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:75:36: error: statement should be inside braces [readability-braces-aroun

controller: Fix readability-braces-around-statements

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:75:36: error: statement should be inside braces [readability-braces-around-statements,-warnings-as-errors]
if (!ledDescr.function.empty())
^
{
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:77:33: error: statement should be inside braces [readability-braces-around-statements,-warnings-as-errors]
if (!ledDescr.color.empty())
^
{
```

Change-Id: I2f1a487638786885ff4ebd9aba26e22c1b943fe1
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

bd0b9e7c05-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

controller: Fix readability-identifier-naming

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:27:13: error: invalid case style for function 'ExitWithError' [readability-ident

controller: Fix readability-identifier-naming

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../controller.cpp:27:13: error: invalid case style for function 'ExitWithError' [readability-identifier-naming,-warnings-as-errors]
static void ExitWithError(const char* err, char** argv)
^~~~~~~~~~~~~
exitWithError
```

Change-Id: I9fc779fcec82c00cb2168e07703a51548990f066
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

84c8054b07-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

argument: Fix cppcoreguidelines-avoid-non-const-global-variables

```
../argument.hpp:52:31: error: variable 'optionstr' is non-const and globally accessible, consider making it const [cppcoreguideli

argument: Fix cppcoreguidelines-avoid-non-const-global-variables

```
../argument.hpp:52:31: error: variable 'optionstr' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
static inline const char* optionstr = "p:?h";
^
```

Change-Id: I2c22a9f2c5cd9dbe0ce23928663dd10679f873c4
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

cbdbed5706-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

argument: Fix cppcoreguidelines-avoid-c-arrays

Suppress it, as switching to std::array<...> causes g++ to complain that
options has an incomplete type.

```
../argument.hpp:44:25: error: do not decl

argument: Fix cppcoreguidelines-avoid-c-arrays

Suppress it, as switching to std::array<...> causes g++ to complain that
options has an incomplete type.

```
../argument.hpp:44:25: error: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,-warnings-as-errors]
static inline const option options[] = {
^
```

Change-Id: I6730bd7fce25eac3fbf23ea083928b8a98bafa35
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

b24c42f506-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

argument: Fix bugprone-reserved-identifier

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../argument.hpp:2:9: error: declaration uses identifier '__ARGUMENT_H', which is a reserved identifie

argument: Fix bugprone-reserved-identifier

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../argument.hpp:2:9: error: declaration uses identifier '__ARGUMENT_H', which is a reserved identifier [bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp,-warnings-as-errors]
^~~~~~~~~~~~
ARGUMENT_H
```

Change-Id: Ib68d3f29b6917872e5d9d5e76a8a5c79c96ae2a2
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

6fb2084d03-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

argument: Suppress cppcoreguidelines-pro-bounds-pointer-arithmetic

Eventually Fix this by replacing this argument class with CLI11.

```
../argument.cpp:63:31: error: do not use pointer arithmetic [

argument: Suppress cppcoreguidelines-pro-bounds-pointer-arithmetic

Eventually Fix this by replacing this argument class with CLI11.

```
../argument.cpp:63:31: error: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic,-warnings-as-errors]
std::cerr << "Usage: " << argv[0] << " [options]" << std::endl;
^
```

Change-Id: I5ae5eb2a86ec3b26fbd323f854c79b6deb570ee0
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

1c73fa6803-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

argument: Fix readability-else-after-return

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../argument.cpp:55:5: error: do not use 'else' after 'return' [readability-else-after-return,-warnin

argument: Fix readability-else-after-return

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../argument.cpp:55:5: error: do not use 'else' after 'return' [readability-else-after-return,-warnings-as-errors]
else
^~~~
```

Change-Id: If366f339e5b72c2509509db8b5290f77f96f064b
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

9eb5592903-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

argument: Slightly simplify option parsing logic

Do so to fix cppcoreguidelines-pro-bounds-pointer-arithmetic and
readability-implicit-bool-conversion:

```
../argument.cpp:43:13: error: do not use

argument: Slightly simplify option parsing logic

Do so to fix cppcoreguidelines-pro-bounds-pointer-arithmetic and
readability-implicit-bool-conversion:

```
../argument.cpp:43:13: error: do not use pointer arithmetic [cppcoreguidelines-pro-bounds-pointer-arithmetic,-warnings-as-errors]
++i;
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../argument.cpp:46:13: error: implicit conversion 'int' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
if (i->val)
^
!= 0
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../argument.cpp:48:35: error: implicit conversion 'int' -> bool [readability-implicit-bool-conversion,-warnings-as-errors]
arguments[i->name] = (i->has_arg ? optarg : true_string);
^
!= 0
```

Change-Id: If3d950d17e9f8117246cffdb9305262a18cf8aa1
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

d8e3da6803-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

argument: Fix readability-braces-around-statements

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../argument.cpp:41:52: error: statement should be inside braces [readability-braces-around-st

argument: Fix readability-braces-around-statements

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../argument.cpp:41:52: error: statement should be inside braces [readability-braces-around-statements,-warnings-as-errors]
while ((i->val != option) && (i->val != 0))
^
{
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../argument.cpp:44:20: error: statement should be inside braces [readability-braces-around-statements,-warnings-as-errors]
if (i->val)
^
{
```

Change-Id: I691e28572d5807cea03faf69a9234e1546a9eb61
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

9648770902-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

argument: Fix cppcoreguidelines-pro-bounds-array-to-pointer-decay

```
../argument.cpp:32:57: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cas

argument: Fix cppcoreguidelines-pro-bounds-array-to-pointer-decay

```
../argument.cpp:32:57: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
(option = getopt_long(argc, argv, optionstr, options, nullptr)))
^
```

Change-Id: I0960608846c1b48318dfadc469b9936bfde02cec
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

1d88e68e02-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

argument: Fix cppcoreguidelines-avoid-c-arrays, modernize-use-nullptr

```
../argument.cpp:31:7: error: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,-warn

argument: Fix cppcoreguidelines-avoid-c-arrays, modernize-use-nullptr

```
../argument.cpp:31:7: error: do not declare C-style arrays, use std::array<> instead [cppcoreguidelines-avoid-c-arrays,-warnings-as-errors]
const option ArgumentParser::options[] = {
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../argument.cpp:34:6: error: use nullptr [modernize-use-nullptr,-warnings-as-errors]
{0, 0, 0, 0},
^
nullptr
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../argument.cpp:34:12: error: use nullptr [modernize-use-nullptr,-warnings-as-errors]
{0, 0, 0, 0},
^
nullptr
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../argument.cpp:41:57: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
(option = getopt_long(argc, argv, optionstr, options, nullptr)))
^
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../argument.cpp:49:9: error: 'auto i' can be declared as 'const auto *i' [readability-qualified-auto,-warnings-as-errors]
auto i = &options[0];
^~~~~
const auto *
```

Change-Id: I132935d52d1470b402b0077ce3ed938b654e61b7
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

d70103d802-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

argument: Fix cppcoreguidelines-avoid-non-const-global-variables

```
../argument.cpp:31:29: error: variable 'optionstr' is non-const and globally accessible, consider making it const [cppcoreguideli

argument: Fix cppcoreguidelines-avoid-non-const-global-variables

```
../argument.cpp:31:29: error: variable 'optionstr' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
const char* ArgumentParser::optionstr = "p:?h";
^
```

Change-Id: I8518db5525e0f67c8f263079a9389621094249bf
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

f9e6cd3a02-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

argument: Fix clang-tidy readability-redundant-string-init

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../argument.cpp:30:35: error: redundant string initialization [readability-redundant-

argument: Fix clang-tidy readability-redundant-string-init

```
/home/andrew/src/openbmc/phosphor-led-sysfs/build/../argument.cpp:30:35: error: redundant string initialization [readability-redundant-string-init,-warnings-as-errors]
const std::string ArgumentParser::empty_string = "";
^~~~~~~~~~~~~~~~~
empty_string
```

Change-Id: I6b802d85b6f0ac0911e3ce85f086e8df29239f37
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

0c3bcbf302-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

clang-format: Specify lambda formatting style

Change-Id: I32ae4e6c28e19be96cb1195ada704dfacc9845b1
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

ebc30b7f05-Feb-2023 Andrew Jeffery <andrew@aj.id.au>

meson: Add boost dependency

Copied the bits and pieces from bmcweb.

Change-Id: I6ce919ac5f30d9c814df6e96ba8b579115c82a4b
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

123456