Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Yahoo!, Majestic-12, Bing

Members: 0
Guests: 6
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
Evoru (32)
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Cygwin errors when compiling ...
Forum Rules | Mark all | Recent Posts

Cygwin errors when compiling C++ STL
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jan 22, 2006, 10:40 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Has anyone ever seen something similar to this in Cygwin when using std::list and creating a list populated only with std::string elements? The warning is slightly annoying but the code will run after getting through these warnings. Is there something special that should be done with std::string lists or is this perhaps a Cygwin bug?


Compiling o/mspecial.o....
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_list.h: In function `void load_specfuns()':
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_list.h:435: warning: '__p' might be used uninitialized in th
is function


void load_specfuns( void )
{
   FILE *fp;
   char filename[256];
   string sfun;

   speclist.clear();

   snprintf( filename, 256, "%sspecfuns.dat", SYSTEM_DIR );
   if( !( fp = fopen( filename, "r" ) ) )
   {
      bug( "%s: FATAL - cannot load specfuns.dat, exiting.", __FUNCTION__ );
      perror( filename );
      exit( 1 );
   }
   else
   {
      for( ;; )
      {
         if( feof( fp ) )
         {
            bug( "%s: Premature end of file!", __FUNCTION__ );
            FCLOSE( fp );
            return;
         }
         sfun.clear();
         fread_string( sfun, fp );
         if( sfun == "$" )
            break;
         speclist.push_back( sfun );
      }
      FCLOSE( fp );
   }
   return;
}
       
Pages:<< prev 1 next >>