Fix miscellaneous comparisons of integer with NULL that elicit compiler

warnings about comparisons of integer with pointer when NULL is defined
as ((void *) 0) rather than just a bare 0.
This commit is contained in:
Fred Fish 1991-12-14 00:13:05 +00:00
parent dd1f25e078
commit 619fd1455b
3 changed files with 36 additions and 6 deletions

View File

@ -1,3 +1,32 @@
Fri Dec 13 16:09:23 1991 Fred Fish (fnf at cygnus.com)
* breakpoint.c, findvar.c, infrun.c, putenv.c, stack.c: Fix
miscellaneous comparisons of integer with NULL that elicit
compiler warnings about comparison of integer with pointer, when
NULL is ((void *) 0) rather than just a bare 0.
Tue Dec 10 04:07:22 1991 K. Richard Pixley (rich at rtl.cygnus.com)
* Makefile.in: infodir belongs in datadir.
Sun Dec 8 21:13:33 1991 Michael Tiemann (tiemann at sphagnum.cygnus.com)
* symtab.h (struct fn_field): Add new fields `is_private',
`is_protected', `is_stub', making room by reducing the size of
`voffset'.
(struct fn_fieldlist): Delete the fields `private_fn_field_bits'
and `protected_fn_field_bits'.
(TYPE_FN_{PRIVATE,PROTECTED}_BITS): Deleted.
(SET_TYPE_FN_{PRIVATE,PROTECTED}): Deleted.
(TYPE_FN_{PRIVATE,PROTECTED}): Deleted.
(TYPE_FN_FIELD_{STUB,PRIVATE,PROTECTED}): New macros.
* valops.c, valprint.c, symtab.c: All callers updated.
* buildsym.c (read_struct_type): Delete the `visibility' field
from `struct next_fnfield', and rework code so that visibility
info is stored into the fn_field directly. Also, hacked to set
TYPE_FN_FIELD_STUB for both static and normal member functions.
Sat Dec 7 18:13:11 1991 Fred Fish (fnf at cygnus.com)
* i386-tdep.c: Fix a problem on i386 systems where buffered code

View File

@ -119,7 +119,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <stdio.h>
#include <string.h>
#include "defs.h"
#include "param.h"
#include "symtab.h"
#include "frame.h"
#include "inferior.h"
@ -150,6 +149,8 @@ extern int original_stack_limit;
extern char *getenv ();
extern char **environ;
extern void new_tty_prefork (); /* In inflow.c */
extern struct target_ops child_ops; /* In inftarg.c */
@ -901,7 +902,7 @@ wait_for_inferior ()
will be set and we should check whether we've hit the
step breakpoint. */
if (stop_signal == SIGTRAP && trap_expected
&& step_resume_break_address == NULL)
&& step_resume_break_address == 0)
bpstat_clear (&stop_bpstat);
else
{
@ -1312,7 +1313,7 @@ wait_for_inferior ()
breakpoints_inserted = 0;
}
else if (!breakpoints_inserted &&
(step_resume_break_address != NULL || !another_trap))
(step_resume_break_address != 0 || !another_trap))
{
insert_step_breakpoint ();
breakpoints_failed = insert_breakpoints ();

View File

@ -73,7 +73,7 @@ putenv( entry )
/* Find the length of the "NAME=" */
if ( (length=(unsigned) index(entry,'=')) == NULL )
if ( (length=(unsigned) index(entry,'=')) == 0 )
return( -1 );
length = length - (unsigned) entry + 1;
@ -85,7 +85,7 @@ putenv( entry )
if ( strncmp( entry, *p, length ) == 0 )
{
*p = entry;
return( NULL );
return( 0 );
}
@ -105,5 +105,5 @@ putenv( entry )
environ = new_environ;
return(NULL);
return(0);
}