Yeah, it just won't let you assign an int to a pointer, or a pointer to an int, or a (pointer to a pointer) to a pointer, etc without an explicit cast. There's almost no reason to ever do that anyway, so it's probably an error.
So look at how ch->wiznet is defined, and make sure that a pointer to it is compatible with a BITMASK *, however that's defined. Or post more code :P On 5/26/05, Richard Lindsey <[EMAIL PROTECTED]> wrote: > Ok, this should help a bit w/ the first error I was clueless about > earlier :D I dug this up from google... > > could someone explain what this warning is... > (and how to remove it) > '=' : 'int ' differs in levels of indirection from 'char *' > > Thanks, > > Lemme guess - you have a line likeif (myptr = 0) or similar, right? What > the compiler is telling you is that you shouldn't directly compare a > char* and an int, as they aren't the same type of variable. Depending on > your compiler, you can PROBABLY remove that warning by replacing the 0 > with NULL, or you can explicitly cast 0 to a char* like so:if (myptr = > (char*)0) > > With that in mind, it would appear that your ch->wiznet is most likely > declared as const BITMASK * in your header file... the rest of that > error shows that your flag field in the wiznet_table is declared as > sh_int... where you might want to start looking is at how the various > other flag tables are defined... if I remember correctly, wiznet is sort > of different than the rest, being defined as type wiznet_flag_type > instead of regular flag_type... compare how each type declares its flag > field, and you'll probably find out why wiznet is the only one giving > you a problem... > > Hope that helps... > > Richard Lindsey. > > -----Original Message----- > From: omar miisa [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 26, 2005 3:26 PM > To: [email protected] > Subject: runters unlimited bits code > > Hey, i was just putting in runters unlimited bits code and i hit a snag > i > was hoping you guys could help me out with. i was changing my IS_SET('s > to > is_set(&'s and i get this warning that i dont know how to fix, heres > the chunk of code in do_wiznet: > > for (flag = 0; wiznet_table[flag].name != NULL; flag++) > if (is_set(&ch->wiznet,wiznet_table[flag].flag)) > { > strcat(buf,wiznet_table[flag].name); > strcat(buf," "); > } > > the warning is this: > 'sh_int' differs in levels of indirection from 'const BITMASK *' > > it worked fine for everything else though. > > one more quick question about free_mem, is this function: > > // Frees your bitmask. Safe to call dry. Returns 2 if > // it frees anything. 1 if it doesn't. > int free_bitmask(BITMASK *pBmask) { > BMlist *pBMlist, *next; > int found = 1; > for(pBMlist = pBmask->int_list;pBMlist;pBMlist = next) { > next = pBMlist->next; > free_mem(pBMlist); > found = 2; > } > return found; > } > > free_mem doesnt have all the parameters it requires for me(Rot) and i > dont quite understand what the second parameter is for... > > > heres the top of my free_mem, perhaps someone can point me in the right > direction? > > void free_mem( void *pMem, int sMem ) > { > int iList; > int *magic; > > (char *) pMem -= sizeof(*magic); > magic = (int *) pMem; > > > > anyway, thanks for your time and any help, > > _________________________________________________________________ > Don't just Search. Find! http://search.sympatico.msn.ca/default.aspx The > new > MSN Search! Check it out! > > -- > ROM mailing list > [email protected] > Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom > -- > ROM mailing list > [email protected] > Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom >

