> [w.briscoe - Mon Jul 15 17:29:27 2002]: > > I got the following diagnostic: > > cl -c [...] SDBM_File.c > Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for > 80x86 > Copyright (C) Microsoft Corp 1984-1998. All rights reserved. > > SDBM_File.c > SDBM_File.c(296) : warning C4700: local variable 'key' used without having > been initialized > > The line in question is: > > datum_key key = key; /* never used - silence picky compilers. */ > > The following change works for me and is likely to be portable: > > C:\perl-5.8.0-RC3\ext\SDBM_File> \wfb\bin\diff -c 0SDBM_File.xs > SDBM_File.xs > *** 0SDBM_File.xs Sat Jun 1 18:03:10 2002 > --- SDBM_File.xs Mon Jul 15 22:23:18 2002 > *************** > *** 119,125 **** > datum_key > sdbm_NEXTKEY(db, key) > SDBM_File db > ! datum_key key = key; /* never used - silence picky > compilers. */ > > int > sdbm_error(db) > --- 119,125 ---- > datum_key > sdbm_NEXTKEY(db, key) > SDBM_File db > ! datum_key key = {0}; /* never used - silence picky > compilers. */ > > int > sdbm_error(db) > > C:\perl-5.8.0-RC3\ext\SDBM_File> > > The following looks better but may fail in circumstances of which I > know naught. (I have not found the .xs to .c file mapping mechanism.): > > C:\perl-5.8.0-RC3\ext\SDBM_File> \wfb\bin\diff -c 0SDBM_File.xs > SDBM_File.xs > *** 0SDBM_File.xs Sat Jun 1 18:03:10 2002 > --- SDBM_File.xs Mon Jul 15 22:44:50 2002 > *************** > *** 119,125 **** > datum_key > sdbm_NEXTKEY(db, key) > SDBM_File db > - datum_key key = key; /* never used - silence picky > compilers. */ > > int > sdbm_error(db) > --- 119,124 ----
Patch 24994 touches this line. Steve, were you aware of this bug? http://public.activestate.com/cgi-bin/perlbrowse?patch=24994