Skip to content

Commit

Permalink
fix some compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stv0g committed Mar 18, 2017
1 parent 5c4d3d6 commit a80b6fb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 7 additions & 5 deletions orig/axidma_v9_0/src/xaxidma_bd.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
*
*****************************************************************************/

#include <inttypes.h>

#include "xaxidma_bd.h"

/************************** Function Prototypes ******************************/
Expand Down Expand Up @@ -137,8 +139,8 @@ u32 XAxiDma_BdSetBufAddr(XAxiDma_Bd* BdPtr, UINTPTR Addr)

if (Addr & (WordLen - 1)) {
if ((HasDRE & XAXIDMA_BD_HAS_DRE_MASK) == 0) {
xil_printf("Error set buf addr %x with %x and %x,"
" %x\r\n",Addr, HasDRE, (WordLen - 1),
xil_printf("Error set buf addr %" PRIuPTR " with %x and %x,"
" %" PRIuPTR "\r\n",Addr, HasDRE, (WordLen - 1),
Addr & (WordLen - 1));

return XST_INVALID_PARAM;
Expand Down Expand Up @@ -175,8 +177,8 @@ u32 XAxiDma_BdSetBufAddrMicroMode(XAxiDma_Bd* BdPtr, UINTPTR Addr)
Addrlen = XAxiDma_BdRead(BdPtr, XAXIDMA_BD_ADDRLEN_OFFSET);

if (Addr & XAXIDMA_MICROMODE_MIN_BUF_ALIGN) {
xil_printf("Error set buf addr %x and %x,"
" %x\r\n", Addr, XAXIDMA_MICROMODE_MIN_BUF_ALIGN,
xil_printf("Error set buf addr %" PRIuPTR " and %x,"
" %" PRIuPTR "\r\n", Addr, XAXIDMA_MICROMODE_MIN_BUF_ALIGN,
Addr & XAXIDMA_MICROMODE_MIN_BUF_ALIGN);

return XST_INVALID_PARAM;
Expand Down Expand Up @@ -315,7 +317,7 @@ void XAxiDma_BdSetCtrl(XAxiDma_Bd* BdPtr, u32 Data)
void XAxiDma_DumpBd(XAxiDma_Bd* BdPtr)
{

xil_printf("Dump BD %x:\r\n", (UINTPTR)BdPtr);
xil_printf("Dump BD %lx:\r\n", (UINTPTR)BdPtr);
xil_printf("\tNext Bd Ptr: %x\r\n",
(unsigned int)XAxiDma_BdRead(BdPtr, XAXIDMA_BD_NDESC_OFFSET));
xil_printf("\tBuff addr: %x\r\n",
Expand Down
4 changes: 4 additions & 0 deletions orig/intc_v3_4/src/xintc_l.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,15 @@ void XIntc_DeviceInterruptHandler(void *DeviceId)
Xil_Out32(CfgPtr->BaseAddress + XIN_ILR_OFFSET,
ILR_reg);
#endif

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-value"
/*
* Read the ISR again to handle architectures
* with posted write bus access issues.
*/
XIntc_GetIntrStatus(CfgPtr->BaseAddress);
#pragma GCC diagnostic pop

/*
* If only the highest priority interrupt is to
Expand Down

0 comments on commit a80b6fb

Please sign in to comment.