Skip to content

Commit 64d87d2

Browse files
committed
emcTaskStateRestore: return a useful(?) result
.. it's ignored in the caller, but this should be the return value. It quiets a diagnostic about res being assigned but not used.
1 parent 73ea930 commit 64d87d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/emc/task/emctask.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,13 +217,13 @@ int emcTaskHalt()
217217

218218
int emcTaskStateRestore()
219219
{
220-
int res;
220+
int res = 0;
221221
// Do NOT restore on MDI command
222222
if (emcStatus->task.mode == EMC_TASK_MODE_AUTO) {
223223
// Validity of state tag checked within restore function
224224
res = pinterp->restore_from_tag(emcStatus->motion.traj.tag);
225225
}
226-
return 0;
226+
return res;
227227
}
228228

229229
int emcTaskAbort()

0 commit comments

Comments
 (0)