From 001dc07477be3aabc20999bc2d9086ef417136ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fr=C3=B6schle?= Date: Sun, 23 Oct 2016 09:32:02 +0000 Subject: [PATCH] include pci_mem into standard build and fix printf parameter warnings --- BaS_gcc/tos/Makefile | 1 + BaS_gcc/tos/pci_mem/sources/pci_mem.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/BaS_gcc/tos/Makefile b/BaS_gcc/tos/Makefile index 2b49c3f..af2dbf1 100644 --- a/BaS_gcc/tos/Makefile +++ b/BaS_gcc/tos/Makefile @@ -31,6 +31,7 @@ clean: @(cd bascook; make clean) @(cd vmem_test; make clean) @(cd pci_test; make clean) + @(cd pci_mem; make clean) @(cd fpga_test; make clean) diff --git a/BaS_gcc/tos/pci_mem/sources/pci_mem.c b/BaS_gcc/tos/pci_mem/sources/pci_mem.c index 580696e..7bfea44 100644 --- a/BaS_gcc/tos/pci_mem/sources/pci_mem.c +++ b/BaS_gcc/tos/pci_mem/sources/pci_mem.c @@ -32,7 +32,7 @@ void add_mem(struct pci_native_driver_interface *pci) { struct pci_rd *rd; - printf("ATI device with handle 0x%02x found\r\n", handle); + printf("ATI device with handle 0x%02x found\r\n", (unsigned int) handle); rd = PCI_GET_RESOURCE(handle); /* get resource descriptor for ATI graphics card */ printf("rd=%p\r\n", rd); printf("start=%lx, length=%lx, flags=%x\r\n", rd->start, rd->length, rd->flags); @@ -47,19 +47,19 @@ void add_mem(struct pci_native_driver_interface *pci) if ((err = Maddalt(0x04000000 /* rd->start + 0x7C000000UL */, rd->length)) > 0) { printf("%ld MBytes of additional memory added to system at %p\r\n", - rd->length / 1024 / 1024, 0x04000000 /* rd->start + 0x7C000000 */); + (long) (rd->length / 1024 / 1024), (void *) 0x04000000 /* rd->start + 0x7C000000 */); return; } else { - fprintf(stderr, "Maddalt() returned error code %ld\r\n", err); + fprintf(stderr, "Maddalt() returned error code %ld\r\n", (long) err); exit(1); } } } else { - fprintf(stderr, "no resource descriptor for handle 0x%02x found", handle); + fprintf(stderr, "no resource descriptor for handle 0x%02x found", (unsigned int) handle); exit(1); } }