misc: Fixed null-pointer arithmetic error
authorBobby R. Bruce <bbruce@ucdavis.edu>
Wed, 27 May 2020 10:46:07 +0000 (03:46 -0700)
committerBobby R. Bruce <bbruce@ucdavis.edu>
Thu, 28 May 2020 04:48:54 +0000 (04:48 +0000)
commitfc856981d8da4ce0145f1d534c3d981f4bf954da
treeffdfec50e498b424df8b204d0561f3b1645e4344
parenta8fb7a0c1d42aa335643bc2cf1b80ac36ea715ec
misc: Fixed null-pointer arithmetic error

Doing arithmetic on a null pointer is undefined behavior in C/C++. Clang
compilers complain when this occurs. As this MACRO is used twice, and
does nothing important, it has been removed in favor of a more simple
solution. A comment has been added explaining the MACRO's removal.

Change-Id: I42d9356179ee0fa5cb20f827af34bb11780ad1a9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29534
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/dev/hsa/hsa_packet_processor.hh
src/dev/hsa/hw_scheduler.cc