encoding: reset optional<> if it is uninitialized
* should reset it, in case we reuse it after initializing it.
* initialize the value of `p` using the C++11 style initializer, so it
is zero-initialized.
* revert
2a83ef3c which disables a warning of:
./include/encoding.h:317:7: warning: 't' may be used uninitialized in
this function [-Wmaybe-uninitialized]
where the `t` is the temporary variable for initializing the value of
`p`.
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit
0363236dc754180a0215a818d58587943f84fb53)