#32960 closed defect (fixed)

CID 1457825: stub version of nt_service_parse_options() makes coverity think we have dead code

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.4.3.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: easy regression 043-must
Cc: Actual Points: .1
Parent ID: Points:
Reviewer: ahf Sponsor:


 *** CID 1457825:  Possible Control flow issues  (DEADCODE)
/src/app/main/main.c: 1244 in tor_run_main()
1238         memcpy(argv + tor_cfg->argc, tor_cfg->argv_owned,
1239                tor_cfg->argc_owned*sizeof(char*));
1241       int done = 0;
1242       result = nt_service_parse_options(argc, argv, &done);
1243       if (done)
>>>     CID 1457825:  Possible Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "goto done;".
1244         goto done;
1246       pubsub_install();
1248       {
1249         int init_rv = tor_init(argc, argv);

Child Tickets

Change History (3)

comment:1 Changed 10 months ago by nickm

Actual Points: .1
Status: assignedneeds_review

See branch ticket32960 with PR at https://github.com/torproject/tor/pull/1663

comment:2 Changed 10 months ago by ahf

Reviewer: ahf
Status: needs_reviewmerge_ready

Cute fix. Looks good.

comment:3 Changed 10 months ago by nickm

Resolution: fixed
Status: merge_readyclosed

Merged to master.

Note: See TracTickets for help on using tickets.