Fix gcc12 warnings
I'm getting a few weird warnings when building Gaudi in optimized mode with gcc 12:
-
maybe-uninitialized
when passing an r-value reference to tostd::make_unique
(see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107138#c4) -
dangling-pointer
to an object on the stack of which I'm never trying to access the address
For the first case I decided to hide the warning (432b2972) and for the second I refactored slightly the code (de9ab00c).