Should I worry about “Conditional jump or move depends on uninitialised value(s)”?

后端 未结 6 2112
醉酒成梦
醉酒成梦 2021-01-06 06:04

If you\'ve used Memcheck (from Valgrind) you\'ll probably be familiar with this message...

Conditional jump or move depends on uninitialized value(s)<

6条回答
  •  北恋
    北恋 (楼主)
    2021-01-06 06:34

    In 64-bits machine. Usually, int takes 4 bytes in memory. But long will take 8 bytes in memory. So simply refer an int value as long format will cause totally incorrect result. An convert is needed in this situation.

提交回复
热议问题