fix GCC's >>'dims1offset' may be used uninitialized<< warning