[client] fix a bug that routine will sometimes use uninitialized values

 - In C, goto instruction will skip valuable's initialization, which is
      thought of as a tricky thing.
 - Fix clang compiler warning -Wsometimes-uninitialized