Add name to anonymous objects to avoid cppcheck error

`cppcheck` complains that the objects are destroyed immediately, which is the intended behavior here. Nevertheless, giving them a name silences the warning.