Opened 8 years ago

Closed 8 years ago

Last modified 11 months ago

#5656 closed defect (fixed)

WARNING: No error!

Reported by: SF/vcappe Owned by: fingolfin
Priority: normal Component: --Other--
Keywords: Cc:
Game:

Description

Since commit 3a57419; commands that do nothing but print some info on stdout and exit (e.g -v, -t, -z), will also print a 'WARNING: No error' on stderr. In base/main.cpp:

@@ -352,8 +351,10 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {

// TODO: deal with settings that require plugins to be loaded
res = Base::processSettings(command, settings);
- if (res.getCode() != Common::kArgumentNotProcessed)
+ if (res.getCode() != Common::kArgumentNotProcessed) {
+ warning("%s", res.getDesc().c_str());
return res.getCode();
+ }

iiuc, the warning should really only happen if (res.getCode() != Common::kNoError). (but the return still need to happen when res.getCode() is kNoError; kNoError here means that it was a command-line only command and that we are done).

Ticket imported from: #3291522. Ticket imported from: bugs/5656.

Change History (5)

comment:1 by lordhoto, 8 years ago

Assiging to Fingolfin, since it was his commit. Fingolfin could you take a look at this?

comment:2 by lordhoto, 8 years ago

Owner: set to fingolfin

comment:3 by fingolfin, 8 years ago

Oops, silly bug, thanks for the report. Fixed in git, both master and release branch.

comment:4 by fingolfin, 8 years ago

Resolution: fixed
Status: newclosed

comment:5 by digitall, 11 months ago

Component: --Other--
Note: See TracTickets for help on using tickets.