![]() |
| | #1 |
| Registered User Join Date: Sep 2009
Posts: 5
| derefrencing pointer to incomplete type error Code: struct list_head cache_chain, *p;
list_for_each(p, &cache_chain){
kmem_cache_t *cachep=list_entry(p, struct kmem_cache_t, next);
...
}
error: dereferencing pointer to incomplete type error: invalid use of incomplete typedef 'keme_cache_t' what should I do? |
| aliasghar is offline | |
| | #2 | |
| Registered User Join Date: Sep 2004 Location: California
Posts: 2,845
| Quote:
If it is just a typo, then it's appears to be a problem where you typedef'd a type, but didn't include the header file for that type.
__________________ bit∙hub [bit-huhb] n. A source and destination for information. | |
| bithub is offline | |
| | #3 |
| Registered User Join Date: Sep 2009
Posts: 5
| yes, that's a typo. I think the error is because of one of these two reasons: 1. the header file for kmem_cache_t is not included: I tried to find the header file but I couldn't. 2. cache_chain is not initialized. this reason is more logical for me, but I don't know how to initialize it. can you help me, please? and, thanks for first reply. |
| aliasghar is offline | |
| | #4 | |
| subminimalist Join Date: Jul 2008 Location: NYC
Posts: 3,944
| Quote:
Then I googled this [PATCH] Remove the deprecated "kmem_cache_t" typedef from slab.h. apparently kmem_cache_t used to be in slab.h (a kernel header) but is no longer used in the kernel tree so has been depreciated right out. I think the original typdef is in that post tho, so you could just paste it in.
__________________ Accuracy and integrity mean nothing if you don't make it past the censors...PYTHAGORAS | |
| MK27 is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Beginner Needs help in Dev-C++ | Korrupt Lawz | C++ Programming | 18 | 05-02-2009 12:27 PM |
| Testing some code, lots of errors... | Sparrowhawk | C Programming | 48 | 12-15-2008 04:09 AM |
| Dikumud | maxorator | C++ Programming | 1 | 10-01-2005 06:39 AM |
| Problem with Visual C++ Object-Oriented Programming Book. | GameGenie | C++ Programming | 9 | 08-29-2005 11:21 PM |
| C++ compilation issues | Rupan | C++ Programming | 1 | 08-22-2005 05:45 AM |