Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
Removed strerror(errno) from error messages as it
is not required for argument checks.
  • Loading branch information
Annu149 committed May 23, 2024
1 parent cfa141f commit 482967c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/bin/pg_waldump/pg_waldump.c
Original file line number Diff line number Diff line change
Expand Up @@ -1129,13 +1129,13 @@ main(int argc, char **argv)
char xlogfname[MAXFNAMELEN];
if (!timeline_specified)
{
pg_log_error("timeline not specified.", strerror(errno));
pg_log_error("timeline not specified");
goto bad_argument;
}

if (!path_specified)
{
pg_log_error("path not specified.", strerror(errno));
pg_log_error("path not specified");
goto bad_argument;
}

Expand Down
4 changes: 2 additions & 2 deletions src/bin/pg_waldump/t/001_basic.pl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
$node->command_checks_all(['pg_waldump', '-p', "$pgdata/pg_wal/", '--last-valid-walname'],
1,
[qr{^$}],
[qr/pg_waldump: error: timeline not specified.\nTry "pg_waldump --help" for more information./],
[qr/pg_waldump: error: timeline not specified\nTry "pg_waldump --help" for more information./],
'pg_waldump fails if timeline not provided');

$node->command_checks_all(['pg_waldump', '-p', "$pgdata/pg_wal/", '-t', 'st', '--last-valid-walname'],
Expand All @@ -33,7 +33,7 @@
$node->command_checks_all(['pg_waldump', '-t', '1', '--last-valid-walname'],
1,
[qr{^$}],
[qr/pg_waldump: error: path not specified.\nTry "pg_waldump --help" for more information./],
[qr/pg_waldump: error: path not specified\nTry "pg_waldump --help" for more information./],
'pg_waldump fails if pg_wal path not provided using -p');

$node->command_checks_all(['pg_waldump', '-p', "/tmp/pg_wal/", '-t', '1', '--last-valid-walname'],
Expand Down

0 comments on commit 482967c

Please # to comment.