diff options
author | Tor Egge <Tor.Egge@online.no> | 2021-04-30 11:16:28 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2021-04-30 11:16:28 +0200 |
commit | edd73d0ba5a3cfb856f9f75e98340efc2ade556a (patch) | |
tree | 2b0dc868883e33b4e4d979191a445e2f88af0090 | |
parent | 724ae768c90eefd08ffab79d6dafc520abeacc04 (diff) |
Use int for FastOS_UNIX_Application::GetOpt() return value.
23 files changed, 23 insertions, 23 deletions
diff --git a/config/src/apps/vespa-configproxy-cmd/main.cpp b/config/src/apps/vespa-configproxy-cmd/main.cpp index bb908e7268b..967bfee4ba9 100644 --- a/config/src/apps/vespa-configproxy-cmd/main.cpp +++ b/config/src/apps/vespa-configproxy-cmd/main.cpp @@ -19,7 +19,7 @@ public: bool Application::parseOpts() { - char c = '?'; + int c = '?'; const char *optArg = NULL; int optInd = 0; while ((c = GetOpt("m:s:p:h", optArg, optInd)) != -1) { diff --git a/config/src/apps/vespa-get-config/getconfig.cpp b/config/src/apps/vespa-get-config/getconfig.cpp index e8ef1765473..273a3abd1cd 100644 --- a/config/src/apps/vespa-get-config/getconfig.cpp +++ b/config/src/apps/vespa-get-config/getconfig.cpp @@ -91,7 +91,7 @@ int GetConfig::Main() { bool debugging = false; - char c = -1; + int c = -1; std::vector<vespalib::string> defSchema; const char *schema = nullptr; diff --git a/config/src/apps/vespa-ping-configproxy/pingproxy.cpp b/config/src/apps/vespa-ping-configproxy/pingproxy.cpp index a47fd25f9af..787681cc670 100644 --- a/config/src/apps/vespa-ping-configproxy/pingproxy.cpp +++ b/config/src/apps/vespa-ping-configproxy/pingproxy.cpp @@ -70,7 +70,7 @@ PingProxy::Main() { int retval = 0; bool debugging = false; - char c = -1; + int c = -1; const char *serverHost = "localhost"; int clientTimeout = 5; diff --git a/configutil/src/apps/configstatus/main.cpp b/configutil/src/apps/configstatus/main.cpp index befd0e649f6..218844a2a90 100644 --- a/configutil/src/apps/configstatus/main.cpp +++ b/configutil/src/apps/configstatus/main.cpp @@ -33,7 +33,7 @@ Application::Application() Application::~Application() { } int Application::parseOpts() { - char c = '?'; + int c = '?'; const char *optArg = NULL; int optInd = 0; while ((c = GetOpt("c:s:vC:f:", optArg, optInd)) != -1) { diff --git a/configutil/src/apps/modelinspect/main.cpp b/configutil/src/apps/modelinspect/main.cpp index c43294be8de..9125cbff379 100644 --- a/configutil/src/apps/modelinspect/main.cpp +++ b/configutil/src/apps/modelinspect/main.cpp @@ -32,7 +32,7 @@ Application::~Application() { } int Application::parseOpts() { - char c = '?'; + int c = '?'; const char *optArg = NULL; int optInd = 0; while ((c = GetOpt("hvut:c:C:", optArg, optInd)) != -1) { diff --git a/fbench/src/fbench/fbench.cpp b/fbench/src/fbench/fbench.cpp index 084fc2e48e6..57efb8a47e0 100644 --- a/fbench/src/fbench/fbench.cpp +++ b/fbench/src/fbench/fbench.cpp @@ -366,7 +366,7 @@ FBench::Main(int argc, char *argv[]) // parse options and override defaults. int idx; - char opt; + int opt; const char *arg; bool optError; diff --git a/fbench/src/filterfile/filterfile.cpp b/fbench/src/filterfile/filterfile.cpp index e9b35de97e0..74d00ecf2b9 100644 --- a/fbench/src/filterfile/filterfile.cpp +++ b/fbench/src/filterfile/filterfile.cpp @@ -21,7 +21,7 @@ main(int argc, char** argv) // parse options and override defaults. int optIdx; - char opt; + int opt; const char *arg; bool optError; diff --git a/fbench/src/splitfile/splitfile.cpp b/fbench/src/splitfile/splitfile.cpp index 1e86ab6bf5c..ef85a59020d 100644 --- a/fbench/src/splitfile/splitfile.cpp +++ b/fbench/src/splitfile/splitfile.cpp @@ -20,7 +20,7 @@ main(int argc, char** argv) // parse options and override defaults. int idx; - char opt; + int opt; const char *arg; bool optError; diff --git a/fsa/src/alltest/conceptnet_test.cpp b/fsa/src/alltest/conceptnet_test.cpp index 03a88434776..3b19f6eade8 100644 --- a/fsa/src/alltest/conceptnet_test.cpp +++ b/fsa/src/alltest/conceptnet_test.cpp @@ -10,7 +10,7 @@ using namespace fsa; int main(int argc, char **argv) { - char opt; + int opt; //extern char *optarg; extern int optind; diff --git a/fsa/src/apps/fsadump/fsadump.cpp b/fsa/src/apps/fsadump/fsadump.cpp index 5308f113356..117f755eb22 100644 --- a/fsa/src/apps/fsadump/fsadump.cpp +++ b/fsa/src/apps/fsadump/fsadump.cpp @@ -67,7 +67,7 @@ int main(int argc, char** argv) FSA_Input_Format format = OUTPUT_UNDEF; const char *input_file; - char opt; + int opt; extern int optind; while((opt=getopt(argc,argv,"ebBhntpdV")) != -1){ diff --git a/fsa/src/apps/fsainfo/fsainfo.cpp b/fsa/src/apps/fsainfo/fsainfo.cpp index 61af267545b..76177592257 100644 --- a/fsa/src/apps/fsainfo/fsainfo.cpp +++ b/fsa/src/apps/fsainfo/fsainfo.cpp @@ -41,7 +41,7 @@ int main(int argc, char** argv) { const char *fsa_file; - char opt; + int opt; extern int optind; while((opt=getopt(argc,argv,"hV")) != -1){ diff --git a/fsa/src/apps/makefsa/makefsa.cpp b/fsa/src/apps/makefsa/makefsa.cpp index f86a0d781c1..72162851f16 100644 --- a/fsa/src/apps/makefsa/makefsa.cpp +++ b/fsa/src/apps/makefsa/makefsa.cpp @@ -73,7 +73,7 @@ int main(int argc, char** argv) bool verbose = false; unsigned int lines=0,count = 0; - char opt; + int opt; extern char *optarg; extern int optind; diff --git a/juniper/src/test/testenv.cpp b/juniper/src/test/testenv.cpp index 2a83df13487..650bc9f2cb7 100644 --- a/juniper/src/test/testenv.cpp +++ b/juniper/src/test/testenv.cpp @@ -19,7 +19,7 @@ Juniper * _Juniper; TestEnv::TestEnv(FastOS_Application* app, const char* propfile) : _props(), _config(), _juniper(), _wordFolder() { - char c; + int c; const char* oarg = NULL; int oind = 1; diff --git a/searchlib/src/apps/vespa-attribute-inspect/vespa-attribute-inspect.cpp b/searchlib/src/apps/vespa-attribute-inspect/vespa-attribute-inspect.cpp index 6e5e3f75b5e..14584a46a04 100644 --- a/searchlib/src/apps/vespa-attribute-inspect/vespa-attribute-inspect.cpp +++ b/searchlib/src/apps/vespa-attribute-inspect/vespa-attribute-inspect.cpp @@ -113,7 +113,7 @@ LoadAttribute::Main() bool doHuge = false; int idx = 1; - char opt; + int opt; const char * arg; bool optError = false; while ((opt = GetOpt("pasf:h", arg, idx)) != -1) { diff --git a/searchlib/src/apps/vespa-fileheader-inspect/vespa-fileheader-inspect.cpp b/searchlib/src/apps/vespa-fileheader-inspect/vespa-fileheader-inspect.cpp index e512cfcdffb..d67946d29f1 100644 --- a/searchlib/src/apps/vespa-fileheader-inspect/vespa-fileheader-inspect.cpp +++ b/searchlib/src/apps/vespa-fileheader-inspect/vespa-fileheader-inspect.cpp @@ -57,7 +57,7 @@ Application::usage() int Application::parseOpts() { - char c = '?'; + int c = '?'; const char *optArg = NULL; int optInd = 0; while ((c = GetOpt("d:f:qh", optArg, optInd)) != -1) { diff --git a/searchlib/src/tests/attribute/benchmark/attributebenchmark.cpp b/searchlib/src/tests/attribute/benchmark/attributebenchmark.cpp index fc87e07a4e9..bf5233fd809 100644 --- a/searchlib/src/tests/attribute/benchmark/attributebenchmark.cpp +++ b/searchlib/src/tests/attribute/benchmark/attributebenchmark.cpp @@ -486,7 +486,7 @@ AttributeBenchmark::Main() dc._prefixSearch = false; int idx = 1; - char opt; + int opt; const char * arg; bool optError = false; while ((opt = GetOpt("n:u:v:s:q:p:r:c:l:h:i:a:e:S:E:D:L:bRPtw", arg, idx)) != -1) { diff --git a/searchlib/src/tests/bitvector/bitvectorbenchmark.cpp b/searchlib/src/tests/bitvector/bitvectorbenchmark.cpp index 17300125ed4..dc0dc646d77 100644 --- a/searchlib/src/tests/bitvector/bitvectorbenchmark.cpp +++ b/searchlib/src/tests/bitvector/bitvectorbenchmark.cpp @@ -168,7 +168,7 @@ int BitVectorBenchmark::Main() int idx = 1; std::string operation; size_t numBits(8*1000000); - char opt; + int opt; const char * arg; bool optError = false; while ((opt = GetOpt("n:t:", arg, idx)) != -1) { diff --git a/searchlib/src/tests/diskindex/fieldwriter/fieldwriter_test.cpp b/searchlib/src/tests/diskindex/fieldwriter/fieldwriter_test.cpp index 8755af9a133..ad0e3d88ad5 100644 --- a/searchlib/src/tests/diskindex/fieldwriter/fieldwriter_test.cpp +++ b/searchlib/src/tests/diskindex/fieldwriter/fieldwriter_test.cpp @@ -649,7 +649,7 @@ int FieldWriterTest::Main() { int argi; - char c; + int c; const char *optArg; if (_argc > 0) { diff --git a/searchlib/src/tests/features/featurebenchmark.cpp b/searchlib/src/tests/features/featurebenchmark.cpp index 6e1c5b1487c..72f693e72f4 100644 --- a/searchlib/src/tests/features/featurebenchmark.cpp +++ b/searchlib/src/tests/features/featurebenchmark.cpp @@ -597,7 +597,7 @@ Benchmark::Main() setup_search_features(_factory); int idx = 1; - char opt; + int opt; const char * arg; bool optError = false; vespalib::string file; diff --git a/searchlib/src/tests/postinglistbm/postinglistbm.cpp b/searchlib/src/tests/postinglistbm/postinglistbm.cpp index 695710873c4..7fa924f7002 100644 --- a/searchlib/src/tests/postinglistbm/postinglistbm.cpp +++ b/searchlib/src/tests/postinglistbm/postinglistbm.cpp @@ -110,7 +110,7 @@ int PostingListBM::Main() { int argi; - char c; + int c; const char *optArg; argi = 1; diff --git a/searchlib/src/tests/transactionlogstress/translogstress.cpp b/searchlib/src/tests/transactionlogstress/translogstress.cpp index 5792da7aa18..96772a0ee00 100644 --- a/searchlib/src/tests/transactionlogstress/translogstress.cpp +++ b/searchlib/src/tests/transactionlogstress/translogstress.cpp @@ -642,7 +642,7 @@ TransLogStress::Main() vespalib::duration sleepTime = 4s; int idx = 1; - char opt; + int opt; const char * arg; bool optError = false; while ((opt = GetOpt("d:p:t:f:s:v:c:e:g:i:a:b:h", arg, idx)) != -1) { diff --git a/slobrok/src/apps/slobrok/slobrok.cpp b/slobrok/src/apps/slobrok/slobrok.cpp index 5d650fafc96..390b7356410 100644 --- a/slobrok/src/apps/slobrok/slobrok.cpp +++ b/slobrok/src/apps/slobrok/slobrok.cpp @@ -53,7 +53,7 @@ App::Main() int argi = 1; const char* optArg; - char c; + int c; while ((c = GetOpt("c:s:p:", optArg, argi)) != -1) { switch (c) { case 'c': diff --git a/slobrok/src/tests/startsome/tstdst.cpp b/slobrok/src/tests/startsome/tstdst.cpp index c119ed3c026..b6be075cf7b 100644 --- a/slobrok/src/tests/startsome/tstdst.cpp +++ b/slobrok/src/tests/startsome/tstdst.cpp @@ -189,7 +189,7 @@ public: int argi = 1; const char* optArg; - char c; + int c; while ((c = GetOpt("n:p:s:", optArg, argi)) != -1) { switch (c) { case 'p': |