Warn when a duplicate CLI argument overrides a previous one (#1053)

Fixes #1050
This commit is contained in:
Rangi
2022-09-25 04:04:30 -04:00
committed by GitHub
parent 2827374505
commit 5ad8a8c958
5 changed files with 44 additions and 19 deletions

View File

@@ -540,7 +540,9 @@ void out_WriteObject(void)
// Set the objectfilename
void out_SetFileName(char *s)
{
if (objectName)
warnx("Overriding output filename %s", objectName);
objectName = s;
if (verbose)
printf("Output filename %s\n", s);
printf("Output filename %s\n", objectName);
}