This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] gdb: Remove casts of NULL during assignment.


*** TEST RESULTS FOR COMMIT be9033582599e50521feb879d7476756c2c8c017 ***

Author: Andrew Burgess <andrew.burgess@embecosm.com>
Branch: master
Commit: be9033582599e50521feb879d7476756c2c8c017

gdb: Remove casts of NULL during assignment.

In the following code:

    struct symbol *wsym = (struct symbol *) NULL;

the cast of NULL is redundant, it adds noise, and is just one more thing
to change if the type of wsym ever changes.  There are a relatively
small number of places in gdb where the above code pattern is used.
Usually the cast is removed like this:

    struct symbol *wsym = NULL;

This commit updates all the places within the gdb/ directory where we
cast NULL during assignment, removing the cast.

gdb/ChangeLog:

	* c-valprint.c (print_unpacked_pointer): Remove cast of NULL
	pointer.
	* dbxread.c (dbx_end_psymtab): Likewise.
	* gnu-nat.c (gnu_write_inferior): Likewise.
	* mdebugread.c (cross_ref): Likewise.
	* p-valprint.c (pascal_val_print): Likewise.
	* xcoffread.c (xcoff_end_psymtab): Likewise.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]