diff --git a/src/drv/ansi/drvAt5Vxi.c b/src/drv/ansi/drvAt5Vxi.c index 73001adbd..246d255cb 100644 --- a/src/drv/ansi/drvAt5Vxi.c +++ b/src/drv/ansi/drvAt5Vxi.c @@ -1130,7 +1130,7 @@ void at5vxi_stat( work = ((uint32_t)pdd->bio[1]) << (sizeof(uint16_t)*NBBY); work |= pdd->bio[0]; - printf("\tBIO: value %x\n", work); + printf("\tBIO: value %lx\n", (unsigned long) work); } for(channel=0; channeltv); channel++){ diff --git a/src/drv/ansi/drvEpvxi.c b/src/drv/ansi/drvEpvxi.c index 66c817d18..f03dee642 100644 --- a/src/drv/ansi/drvEpvxi.c +++ b/src/drv/ansi/drvEpvxi.c @@ -2507,7 +2507,7 @@ unsigned servant_area } else{ printf( - "VXI resman: gd resp %x\n", + "VXI resman: gd resp %lx\n", response); } } @@ -2842,7 +2842,7 @@ VXIE *pvxie A32_size = pvxie->A32_size; psubvxie = (VXIE *) &pvxie->extenders.node; - while(psubvxie = (VXIE *) ellNext((ELLNODE *)psubvxie)){ + while( (psubvxie = (VXIE *) ellNext((ELLNODE *)psubvxie)) ){ psubvxie->A24_base = A24_base; psubvxie->A24_size = A24_size; @@ -3235,7 +3235,7 @@ EPVXISTAT epvxiDeviceList(void) if(pmxidi->msg_dev_online){ printf("msg online, "); } - printf("driver ID %d, ", pmxidi->driverID); + printf("driver ID %ld, ", pmxidi->driverID); if(taskIdVerify(pmxidi->taskID)>=0){ printf( "opened by task %s, ", taskName(pmxidi->taskID)); @@ -4577,19 +4577,19 @@ LOCAL void epvxiExtenderPrint(VXIE *pvxie) } if(pvxie->A24_mapped){ - printf("\tA24 window base=0x%08X size=0x%08X\n", + printf("\tA24 window base=0x%08lX size=0x%08lX\n", pvxie->A24_base, pvxie->A24_size); } if(pvxie->A32_mapped){ - printf("\tA32 window base=0x%08X size=0x%08X\n", + printf("\tA32 window base=0x%08lX size=0x%08lX\n", pvxie->A32_base, pvxie->A32_size); } psubvxie = (VXIE *) &pvxie->extenders.node; - while(psubvxie = (VXIE *) ellNext((ELLNODE *)psubvxie)){ + while( (psubvxie = (VXIE *) ellNext((ELLNODE *)psubvxie)) ){ epvxiExtenderPrint(psubvxie); } } diff --git a/src/drv/ansi/drvEpvxiMsg.c b/src/drv/ansi/drvEpvxiMsg.c index b8c70ce09..2f03de8cf 100644 --- a/src/drv/ansi/drvEpvxiMsg.c +++ b/src/drv/ansi/drvEpvxiMsg.c @@ -47,6 +47,8 @@ static char *sccsId = "@(#)drvEpvxiMsg.c 1.15\t8/27/93"; +#include + #include #include #include @@ -204,8 +206,8 @@ EPVXISTAT vxi_msg_test( return status; } - buf[count] = NULL; - printf("%s %d\n", buf,count); + buf[count] = '\0'; + printf("%s %ld\n", buf,count); status = epvxiWrite(la, "*TST?", 5, &count, epvxiWriteOptNone); if(status != VXI_SUCCESS){ @@ -216,8 +218,8 @@ EPVXISTAT vxi_msg_test( return status; } - buf[count] = NULL; - printf("%s %d\n", buf, count); + buf[count] = '\0'; + printf("%s %ld\n", buf, count); return VXI_SUCCESS; } @@ -246,7 +248,7 @@ EPVXISTAT vxi_msg_print_id( return status; } - buf[count] = NULL; + buf[count] = '\0'; printf(" %s ", buf); return VXI_SUCCESS; @@ -336,7 +338,7 @@ unsigned long cmd } if(pvximdi->trace){ - printf( "VXI Trace: (la=0X%X) Cmd -> %x\n", + printf( "VXI Trace: (la=0X%X) Cmd -> %lx\n", la, cmd); } @@ -392,7 +394,7 @@ unsigned long *presp } if(pvximdi->trace){ - printf( "VXI Trace: (la=0X%X) Query -> %x\n", + printf( "VXI Trace: (la=0X%X) Query -> %lx\n", la, *presp); } @@ -706,7 +708,7 @@ EPVXISTAT epvxiReadSlowHandshake( /* * append the NULL */ - *pbuf = NULL; + *pbuf = '\0'; if(function_status == S_epvxi_protocolError){ return fetch_protocol_error(la); @@ -1059,7 +1061,7 @@ printf("mb device has response gen\n"); resp); return VXI_SUCCESS; } -printf("sent ctrl resp (la=%d) (cmd=%x)\n", la, cmd); +printf("sent ctrl resp (la=%d) (cmd=%lx)\n", la, cmd); printf("synchronized msg based device is ready!\n"); @@ -1256,7 +1258,7 @@ LOCAL EPVXISTAT vxiAttemptAsyncModeControl( la); return status; } -printf("sent id cmdr (la=0X%X) (cmd=%x)\n", la, tmpcmd); +printf("sent id cmdr (la=0X%X) (cmd=%lx)\n", la, tmpcmd); } status = epvxiCmdQuery( @@ -1285,7 +1287,7 @@ printf("sent id cmdr (la=0X%X) (cmd=%x)\n", la, tmpcmd); resp); return status; } -printf("sent asynch mode control (la=%d) (cmd=%x)\n",la,cmd); +printf("sent asynch mode control (la=%d) (cmd=%lx)\n",la,cmd); if(cmd & MBC_AMC_RESP_INT_ENABLE){ @@ -1500,11 +1502,11 @@ void vxiMsgInt( logMsg ( "%s: vxiMsgInt(): msg int to ukn or closed dev\n", (int)__FILE__, - NULL, - NULL, - NULL, - NULL, - NULL); + 0, + 0, + 0, + 0, + 0); } } @@ -1526,10 +1528,10 @@ int16_t signal logMsg( "%s: VXI event was ignored %x\n", (int)__FILE__, signal, - NULL, - NULL, - NULL, - NULL); + 0, + 0, + 0, + 0); } else{ vxiMsgInt(signal_la); diff --git a/src/drv/ansi/drvHpe1445a.c b/src/drv/ansi/drvHpe1445a.c index 789145a3a..d0e8514bf 100644 --- a/src/drv/ansi/drvHpe1445a.c +++ b/src/drv/ansi/drvHpe1445a.c @@ -40,6 +40,7 @@ static char *sccsId = "@(#)drvHpe1445a.c 1.5\t8/27/93"; #include #include #include +#include #include #include @@ -1004,14 +1005,13 @@ unsigned long npoints return s; } - - sprintf(pc->buf, "source:list:segment:define %u", npoints); + sprintf(pc->buf, "source:list:segment:define %lu", npoints); s = hpe1445aWrite(la, pc->buf); if(s){ return s; } sprintf( pc->buf, - "source:arbitrary:download VXI,%s%s,%d", + "source:arbitrary:download VXI,%s%s,%lu", SEGMENT_NAME_PREFIX, pWaveformName, npoints); diff --git a/src/vxWorks/drv/ansi/drvAt5Vxi.c b/src/vxWorks/drv/ansi/drvAt5Vxi.c index 73001adbd..246d255cb 100644 --- a/src/vxWorks/drv/ansi/drvAt5Vxi.c +++ b/src/vxWorks/drv/ansi/drvAt5Vxi.c @@ -1130,7 +1130,7 @@ void at5vxi_stat( work = ((uint32_t)pdd->bio[1]) << (sizeof(uint16_t)*NBBY); work |= pdd->bio[0]; - printf("\tBIO: value %x\n", work); + printf("\tBIO: value %lx\n", (unsigned long) work); } for(channel=0; channeltv); channel++){ diff --git a/src/vxWorks/drv/ansi/drvHpe1445a.c b/src/vxWorks/drv/ansi/drvHpe1445a.c index 789145a3a..d0e8514bf 100644 --- a/src/vxWorks/drv/ansi/drvHpe1445a.c +++ b/src/vxWorks/drv/ansi/drvHpe1445a.c @@ -40,6 +40,7 @@ static char *sccsId = "@(#)drvHpe1445a.c 1.5\t8/27/93"; #include #include #include +#include #include #include @@ -1004,14 +1005,13 @@ unsigned long npoints return s; } - - sprintf(pc->buf, "source:list:segment:define %u", npoints); + sprintf(pc->buf, "source:list:segment:define %lu", npoints); s = hpe1445aWrite(la, pc->buf); if(s){ return s; } sprintf( pc->buf, - "source:arbitrary:download VXI,%s%s,%d", + "source:arbitrary:download VXI,%s%s,%lu", SEGMENT_NAME_PREFIX, pWaveformName, npoints);