Build: Added -Wall,extra,-pedantic, fixed warnings and peeves.

This commit is contained in:
2025-01-10 18:27:10 -04:00
parent ce2d47e6b9
commit 876526364b
10 changed files with 38 additions and 23 deletions
+17 -11
View File
@@ -5,6 +5,7 @@
#include <string>
#include <vector>
#include <sys/stat.h>
#include <sstream>
struct option OptionParser::longOptions[] = {
@@ -21,8 +22,9 @@ struct option OptionParser::longOptions[] = {
{0, 0, 0, 0}
};
void OptionParser::parseArguments(int argc, char *argv[])
void OptionParser::parseArguments(int argc, char *argv[], char **envp)
{
(void)envp;
int opt;
int optionIndex = 0;
@@ -91,24 +93,28 @@ std::string OptionParser::getUsage() const
"[-?|--help]";
}
void OptionParser::dumpOptions() const
std::string OptionParser::stringifyOptions(void) const
{
std::ostringstream oss;
if (verbose) {
std::cout << "Verbose mode is on" << std::endl;
oss << "Verbose mode is on" << std::endl;
}
std::cout << "Device Specs: " << deviceSpecs << std::endl;
oss << "Device Specs: " << deviceSpecs << std::endl;
std::cout << "Device Spec Files: ";
oss << "Device Spec Files: ";
for (const auto& file : deviceSpecFiles) {
std::cout << file << " ";
oss << file << " ";
}
std::cout << std::endl;
oss << std::endl;
std::cout << "Sense API Library Path: " << senseApiLibPath << std::endl;
std::cout << "Sense API Libraries: ";
oss << "Sense API Library Path: " << senseApiLibPath << std::endl;
oss << "Sense API Libraries: ";
for (const auto& lib : senseApiLibs) {
std::cout << lib << " ";
oss << lib << " ";
}
std::cout << std::endl;
oss << std::endl;
return oss.str();
}