Fix binutils compilation error with Clang 8

Summary:
This change fixes the following compilation error when using clang 8 to cross
compile base to powerpc64:

```
/usr/src/gnu/usr.bin/binutils/libopcodes/../../../../contrib/binutils/opcodes/ppc-dis.c💯35:
error: arithmetic on a null pointer treated as a cast from integer to pointer is
a GNU extension [-Werror,-Wnull-pointer-arithmetic]
  info->private_data = (char *) 0 + dialect;
		       ~~~~~~~~~~ ^
1 error generated.
*** [ppc-dis.o] Error code 1

make[6]: stopped in /usr/src/gnu/usr.bin/binutils/libopcodes
1 error
```

Test Plan:
- buildworld for x86_64 (native)
- buildworld for powerpc64 (cross)
- buildworld for powerpc64 (native)

Submitted by:	alfredo.junior_eldorado.org.br
Reviewed By:	emaste, pfg, brooks
Differential Revision:	https://reviews.freebsd.org/D19235
This commit is contained in:
Justin Hibbits 2019-03-05 04:16:50 +00:00
parent 96937e3b23
commit bc2b9c015f

@ -20,6 +20,7 @@ along with this file; see the file COPYING. If not, write to the Free
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include <stdio.h>
#include <inttypes.h>
#include "sysdep.h"
#include "dis-asm.h"
#include "opcode/ppc.h"
@ -97,7 +98,7 @@ powerpc_dialect (struct disassemble_info *info)
dialect |= PPC_OPCODE_64;
}
info->private_data = (char *) 0 + dialect;
info->private_data = (void *)(uintptr_t)dialect;
return dialect;
}