Skip to content

Commit

Permalink
must initialize to prevent errors
Browse files Browse the repository at this point in the history
errors like "potentially uninitialized local pointer variable 'OpenFileNameini' used"
  • Loading branch information
hn-88 authored Apr 4, 2024
1 parent 0ea59d3 commit 81569cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions OCVWarp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,9 +707,9 @@ int main(int argc,char *argv[])
// adding code to work with command-line arguments
// argv[0] = name of exe, argv[1] = ini file path, argv[2] = input file path, argv[3] = output file path
// but no error checking!
char const * SaveFileName;
char const * OpenFileNameini;
char const * OpenFileName;
char const * SaveFileName = "";
char const * OpenFileNameini = "";
char const * OpenFileName = "";
bool argsSupplied = 0;
if (argc == 4) {
OpenFileNameini = argv[1];
Expand Down

0 comments on commit 81569cc

Please sign in to comment.