I guess what the problem is but how can I fix this?(before reset all registers values are undefined but after reset all of them set to zero and after that when I want to set a register with a zero value I have the mentioned warning.

Re: how to fix WARNING:Xst:1710

It is a warning. Determine if it is ok (it probably is) and then ignore it.

EDA tools often present optimizations as warnings. If you come from a SW background this will seem weird. Large designs have many warnings as a result.

In this case, bit index 5 of data_out1 just happens to be 0 for all 64 values in the ROM as well as the reset.

You can "fix" the warning by adding logic that breaks this optimization and sets this bit to 1 in a case that cannot occur in practice. This is not a good choice though. Basically, unlike SW, you should not attempt to get 0 warnings for HW designs.