Missing initialization for some variables

The return statement uses d1 , d2 , d3 and d4 variables but the code
which initialize them inside a if statement and not always this
if statement is corrent. On the other hand these variables are using
for return statement and needed to be initialized. A trivial fix to
pervent some compilers will give build error.