C++ compiler warnings with dlsym()

From: Daniel Burke (addictmud@home.com)
Date: 02/27/99


This isn't really a problem, I'm just trying to eliminate all compiler
warnings.  The mud is slowly developing into complete c++ for about a year
now, and I'm trying to eliminate all compiler warnings possible.  Ones that
I can't seem to get rid of are related to dlsym()... every call to dlsym()
produces this compiler error:

comm.c: In function int main(int, char **)':
comm.c:249: warning: ANSI C++ forbids cast to non-reference type used as
lvalue

      void (*gen)(void);

      if (!((void*)gen = dlsym(libboot, "boot_world__Fv"))) {

Does anyone know if a better way I can type-cast that or define "gen" so it
doesn't product a warning?

Thanks,
Dan.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST