Basic C question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ok... I know i am going to be embarrassed but I am confused by the
below function. The last parameter in do_mpage_readpage() is of type
get_block_t, but when passed to block_read_full_page() it gets passed
as get_block_t *.


static struct bio * do_mpage_readpage(............., get_block_t get_block) {
       ................
       ................
       	if (page_has_buffers(page))
		goto confused;
        .................
confused:
      	if (!PageUptodate(page))
	        block_read_full_page(page, get_block);
       .........
}

int block_read_full_page(struct page *page, get_block_t *get_block) {
        .........
       ..........
}


How does this work ? :-( ....... Isn't gcc supposed to catch this and
flag warning unless I am missing something very obvious.

Thanks -
Manish

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux