Ferrous Moon
http://www.ferrousmoon.com:80/forums/

Function Parameter May Be Uninitialized?
http://www.ferrousmoon.com:80/forums/viewtopic.php?f=45&t=2082
Page 1 of 1

Author:  eddieringle [Mon Oct 11, 2010 6:18 pm ]
Post subject:  Function Parameter May Be Uninitialized?

This popped up in IRC while attempting to disable write protection on the G2's nand (specific information on that is here):
Code:
<scotty2> static inline loff_t fat_make_i_pos(struct super_block *sb, <scotty2> struct buffer_head *bh, <scotty2> struct msdos_dir_entry *de) <scotty2> { <scotty2> return ((loff_t)bh->b_blocknr << MSDOS_SB(sb)->dir_per_block_bits) <scotty2> | (de - (struct msdos_dir_entry *)bh->b_data); <scotty2> } <scotty2> how the **** could de possibly be uninitialized. <scotty2> fs/fat/dir.c:30: error: 'de' may be used uninitialized in this function
Anyone ever run into this before?

Author:  Tycho [Tue Oct 12, 2010 12:17 am ]
Post subject:  Re: Function Parameter May Be Uninitialized?

You didn't provide any details. Compiler, compiler version, etc.

Author:  ChaosR [Tue Oct 12, 2010 9:58 am ]
Post subject:  Re: Function Parameter May Be Uninitialized?

G2 is an Android device. Android uses the linux kernel. This code looks like its part of the kernel. The android NDK contains GCC4.4 . So by deduction I say that was the compiler used.

Author:  prophile [Tue Oct 12, 2010 2:03 pm ]
Post subject:  Re: Function Parameter May Be Uninitialized?

Please show the compiler invocation, and, crucially, the callsite of this function.

Author:  eddieringle [Thu Dec 16, 2010 4:35 pm ]
Post subject:  Re: Function Parameter May Be Uninitialized?

Quote:
... and, crucially, the callsite of this function.
Are you suggesting that the function was passed an uninitialized argument?

Author:  prophile [Thu Dec 16, 2010 7:26 pm ]
Post subject:  Re: Function Parameter May Be Uninitialized?

Yes.

Page 1 of 1 All times are UTC-05:00
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/