diff --git a/calma/CalmaWrite.c b/calma/CalmaWrite.c index 89d3ca20..f31f3aa7 100644 --- a/calma/CalmaWrite.c +++ b/calma/CalmaWrite.c @@ -1601,7 +1601,7 @@ calmaWriteUseFunc( if (whichangle) { calmaOutRH(12, CALMA_ANGLE, CALMA_R8, f); - calmaOut8(whichangle, f); + calmaOut8((char *)whichangle, f); } /* Translation */ @@ -1638,7 +1638,7 @@ calmaWriteUseFunc( if (whichangle) { calmaOutRH(12, CALMA_ANGLE, CALMA_R8, f); - calmaOut8(whichangle, f); + calmaOut8((char *)whichangle, f); } /* If array, number of columns and rows in the array */ diff --git a/calma/CalmaWriteZ.c b/calma/CalmaWriteZ.c index bfaab61d..38c52f63 100644 --- a/calma/CalmaWriteZ.c +++ b/calma/CalmaWriteZ.c @@ -1442,7 +1442,7 @@ calmaWriteUseFuncZ( if (whichangle) { calmaOutRHZ(12, CALMA_ANGLE, CALMA_R8, f); - calmaOut8Z(whichangle, f); + calmaOut8Z((char *)whichangle, f); } /* Translation */ @@ -1479,7 +1479,7 @@ calmaWriteUseFuncZ( if (whichangle) { calmaOutRHZ(12, CALMA_ANGLE, CALMA_R8, f); - calmaOut8Z(whichangle, f); + calmaOut8Z((char *)whichangle, f); } /* If array, number of columns and rows in the array */ diff --git a/cmwind/CMWmain.c b/cmwind/CMWmain.c index a05d3228..c0e8105b 100644 --- a/cmwind/CMWmain.c +++ b/cmwind/CMWmain.c @@ -89,7 +89,7 @@ extern void CMWundoInit(void); * which pump is hit and which mouse button is used to hit it. */ -const ColorBar const colorBars[] = +const ColorBar colorBars[] = { {"Red", CB_RED, STYLE_RED, {{ 2000, 8000}, {10000, 9000}}, {{ 2000, 9500}, {10000, 10500}}}, @@ -106,7 +106,7 @@ const ColorBar const colorBars[] = {0} }; -const ColorPump const colorPumps[] = +const ColorPump colorPumps[] = { {CB_RED, -.0078, {{ 500, 8000}, { 1500, 9000}}}, {CB_RED, .0078, {{10500, 8000}, {11500, 9000}}}, @@ -155,7 +155,7 @@ CMWcreate( char *argv[]) { CMWclientRec *crec; - int color; + unsigned int color; crec = (CMWclientRec *) mallocMagic(sizeof(CMWclientRec)); window->w_clientData = (ClientData) crec; diff --git a/commands/CmdE.c b/commands/CmdE.c index 7e9d6a2e..402ebe09 100644 --- a/commands/CmdE.c +++ b/commands/CmdE.c @@ -201,7 +201,7 @@ cmdEditRedisplayFunc( MagWindow *w, /* Window containing edit cell. */ Rect *area) /* Area to be redisplayed. */ { - static const Rect origin = {-1, -1, 1, 1}; + static const Rect origin = {{-1, -1}, {1, 1}}; Rect tmp; DBWclientRec *crec = (DBWclientRec *) w->w_clientData; diff --git a/commands/CmdTZ.c b/commands/CmdTZ.c index b2ff0921..9c2e9407 100644 --- a/commands/CmdTZ.c +++ b/commands/CmdTZ.c @@ -216,7 +216,7 @@ CmdTech( Tcl_SetResult(magicinterp, DBTechName, NULL); break; case TECH_FILE: - Tcl_SetResult(magicinterp, TechFileName, NULL); + Tcl_SetResult(magicinterp, (char *)TechFileName, NULL); break; case TECH_VERSION: Tcl_SetResult(magicinterp, DBTechVersion, NULL); diff --git a/dbwind/DBWdisplay.c b/dbwind/DBWdisplay.c index d8047390..54d828f2 100644 --- a/dbwind/DBWdisplay.c +++ b/dbwind/DBWdisplay.c @@ -1117,7 +1117,7 @@ dbwTileFunc(tile) } else { - (void) sprintf(string, "%p", tile); + (void) sprintf(string, "%p", (void *) tile); } GeoClip(&r2, &rootClip); @@ -1258,7 +1258,7 @@ dbwTileFunc(tile) } else if (!dbwSeeTypes) { - (void) sprintf(string, "%p", stitch); + (void) sprintf(string, "%p", (void *) stitch); GrPutText(string, STYLE_DRAWTILE, &p, pos, GR_TEXT_SMALL, FALSE, &r2, (Rect *) NULL); } diff --git a/drc/DRCtech.c b/drc/DRCtech.c index 1f47b9c1..47cb3794 100644 --- a/drc/DRCtech.c +++ b/drc/DRCtech.c @@ -174,7 +174,7 @@ DRCPrintStyle(dolist, doforall, docurrent) if (!dolist) TxPrintf("The current style is \""); #ifdef MAGIC_WRAPPER if (dolist) - Tcl_SetResult(magicinterp, DRCCurStyle->ds_name, NULL); + Tcl_SetResult(magicinterp, (char *)DRCCurStyle->ds_name, NULL); else #endif TxPrintf("%s", DRCCurStyle->ds_name); diff --git a/ext2spice/ext2spice.c b/ext2spice/ext2spice.c index c2f2bbdb..cc9f573b 100644 --- a/ext2spice/ext2spice.c +++ b/ext2spice/ext2spice.c @@ -3810,7 +3810,7 @@ nodeVisitDebug(node, res, cap) printf("\t client.name=%s, client.m_w=%p\n", ((nodeClient *)node->efnode_client)->spiceNodeName, - ((nodeClient *)node->efnode_client)->m_w.widths); + (void *)((nodeClient *)node->efnode_client)->m_w.widths); return 0; } diff --git a/extract/ExtTech.c b/extract/ExtTech.c index 0137f6ac..5071f128 100644 --- a/extract/ExtTech.c +++ b/extract/ExtTech.c @@ -693,7 +693,7 @@ ExtPrintStyle(dolist, doforall, docurrent) if (!dolist) TxPrintf("The current style is \""); #ifdef MAGIC_WRAPPER if (dolist) - Tcl_SetResult(magicinterp, ExtCurStyle->exts_name, NULL); + Tcl_SetResult(magicinterp, (char *) ExtCurStyle->exts_name, NULL); else #endif TxPrintf("%s", ExtCurStyle->exts_name); diff --git a/gcr/gcrDebug.c b/gcr/gcrDebug.c index 146b2ff9..dbfece8c 100644 --- a/gcr/gcrDebug.c +++ b/gcr/gcrDebug.c @@ -288,7 +288,7 @@ gcrSaveChannel(ch) char name[128]; int flags, i, j; - (void) sprintf(name, "chan.%p", ch); + (void) sprintf(name, "chan.%p", (void *) ch); fp = fopen(name, "w"); if (fp == NULL) { diff --git a/gcr/gcrShwFlgs.c b/gcr/gcrShwFlgs.c index 35fb85c8..2ce84aa8 100644 --- a/gcr/gcrShwFlgs.c +++ b/gcr/gcrShwFlgs.c @@ -210,7 +210,7 @@ gcrDumpChannel(ch) FILE * fp, * fopen(); netNames[0]=(GCRNet *) 0; - (void) snprintf(name, sizeof(name), "channel.%p", ch); + (void) snprintf(name, sizeof(name), "channel.%p", (void *) ch); if((fp = fopen(name, "w")) == NULL) { TxError("Can't open file %s to dump channel.\n", name); diff --git a/graphics/grDStyle.c b/graphics/grDStyle.c index 88370f0d..1604838a 100644 --- a/graphics/grDStyle.c +++ b/graphics/grDStyle.c @@ -229,8 +229,16 @@ styleBuildDisplayStyle(line, version) */ /* Allow colors to be specified by index or by name */ - if (sscanf(colorName, ((version > 6) ? "%i" : "%o"), &color) <= 0) - color = GrNameToColor(colorName); + if (version > 6) + { + if (sscanf(colorName, "%i", &color) <= 0) + color = GrNameToColor(colorName); + } + else + { + if (sscanf(colorName, "%o", (unsigned int *)&color) <= 0) + color = GrNameToColor(colorName); + } newstyle->style.mask = (mask & grBitPlaneMask); newstyle->style.color = (color & grBitPlaneMask); diff --git a/grouter/grouteChan.c b/grouter/grouteChan.c index e2c32cab..bb801c56 100644 --- a/grouter/grouteChan.c +++ b/grouter/grouteChan.c @@ -364,7 +364,7 @@ glChanCheckFunc(tile, ch) { TITORECT(tile, &r); (void) sprintf(mesg, "Tile client 0x%"DLONG_PREFIX"x doesn't match chan %p", - (dlong) tile->ti_client, ch); + (dlong) tile->ti_client, (void *) ch); DBWFeedbackAdd(&r, mesg, EditCellUse->cu_def, 1, STYLE_MEDIUMHIGHLIGHTS); } @@ -421,7 +421,7 @@ glChanClip(ch) { char mesg[256]; - (void) sprintf(mesg, "After clipping chan %p", ch); + (void) sprintf(mesg, "After clipping chan %p", (void *) ch); glChanShowTiles(mesg); } @@ -471,7 +471,7 @@ glChanShowFunc(tile) return 0; ch = (GCRChannel *) tile->ti_client; ShowRect(EditCellUse->cu_def, &ch->gcr_area, STYLE_MEDIUMHIGHLIGHTS); - (void) sprintf(mesg, "chan %p type=%d", ch, ch->gcr_type); + (void) sprintf(mesg, "chan %p type=%d", (void *) ch, ch->gcr_type); TxMore(mesg); ShowRect(EditCellUse->cu_def, &ch->gcr_area, STYLE_ERASEHIGHLIGHTS); return 0; diff --git a/mzrouter/mzEstimate.c b/mzrouter/mzEstimate.c index d32e8fd7..afb41115 100644 --- a/mzrouter/mzEstimate.c +++ b/mzrouter/mzEstimate.c @@ -1978,7 +1978,7 @@ mzDumpEstFunc(tile, fd) if(fd) { fprintf(fd,"\ntile %p\t\t (x: %d to %d, y: %d to %d)\n", - tile, r.r_xbot, r.r_xtop, r.r_ybot, r.r_ytop); + (void *) tile, r.r_xbot, r.r_xtop, r.r_ybot, r.r_ytop); fprintf(fd,"\thcost = %d ", tilec->tc_hCost); fprintf(fd,"vcost = %d \n", diff --git a/plot/plotVers.c b/plot/plotVers.c index 5f37573f..fc44fa77 100644 --- a/plot/plotVers.c +++ b/plot/plotVers.c @@ -342,7 +342,8 @@ PlotVersTechLine(sectionName, argc, argv) } else { - int i, value; + unsigned int value; + int i; if (argc != 17) { @@ -440,7 +441,8 @@ PlotColorVersTechLine(sectionName, argc, argv) } else { - int i, j, value; + unsigned int value; + int i, j; if (argc != 3 && argc != 4 && argc != 6 && argc != 10 && argc != 18) { diff --git a/resis/ResDebug.c b/resis/ResDebug.c index be4775a9..6358afc3 100644 --- a/resis/ResDebug.c +++ b/resis/ResDebug.c @@ -54,7 +54,7 @@ ResPrintNodeList(fp, list) for (; list != NULL; list = list->rn_more) { fprintf(fp, "node %p: (%d %d) r= %d\n", - list, list->rn_loc.p_x, list->rn_loc.p_y, list->rn_noderes); + (void *) list, list->rn_loc.p_x, list->rn_loc.p_y, list->rn_noderes); } } diff --git a/router/rtrFdback.c b/router/rtrFdback.c index 23be3da4..a9a2040b 100644 --- a/router/rtrFdback.c +++ b/router/rtrFdback.c @@ -99,11 +99,11 @@ RtrChannelError(ch, col, track, msg, net) netname = NLNetName(net); if ((strlen(netname) + strlen(msg)) >= 2048) netname = "too long"; - (void) sprintf(buff, "Net `%s', channel %p: ", netname, ch); + (void) sprintf(buff, "Net `%s', channel %p: ", netname, (void *) ch); } else { - (void) sprintf(buff, "channel %p: ", ch); + (void) sprintf(buff, "channel %p: ", (void *) ch); } (void) strcat(buff, msg); old.p_x = col; diff --git a/router/rtrPin.c b/router/rtrPin.c index 3fa77eb8..aa7bec1e 100644 --- a/router/rtrPin.c +++ b/router/rtrPin.c @@ -431,7 +431,7 @@ void rtrPinShow(pin) pin->gcr_ch->gcr_type, pin->gcr_x, pin->gcr_y, pin->gcr_point.p_x, pin->gcr_point.p_y, - (dlong) pin->gcr_pId, pin->gcr_linked); + (dlong) pin->gcr_pId, (void *) pin->gcr_linked); if (pin->gcr_pId || pin->gcr_linked == NULL) (void) strcat(mesg, " **BLOCKED**"); else DBWFeedbackAdd(&r, mesg, EditCellUse->cu_def, 1, STYLE_PALEHIGHLIGHTS); diff --git a/tiles/tile.c b/tiles/tile.c index a0dae3c3..e7190783 100644 --- a/tiles/tile.c +++ b/tiles/tile.c @@ -815,8 +815,9 @@ tiPrint(tp) Tile *tp; { printf("tp=%p LL=(%d,%d) body=0x%"DLONG_PREFIX"x\n", - tp, LEFT(tp), BOTTOM(tp), (dlong) tp->ti_body); - printf("BL=%p LB=%p RT=%p TR=%p\n", BL(tp), LB(tp), RT(tp), TR(tp)); + (void *) tp, LEFT(tp), BOTTOM(tp), (dlong) tp->ti_body); + printf("BL=%p LB=%p RT=%p TR=%p\n", + (void *) BL(tp), (void *) LB(tp), (void *) RT(tp), (void *) TR(tp)); } void diff --git a/utils/netlist.c b/utils/netlist.c index af01e081..b835732f 100644 --- a/utils/netlist.c +++ b/utils/netlist.c @@ -393,7 +393,7 @@ NLNetName(net) term = net->nnet_terms; if (term == NULL || term->nterm_name == NULL) { - (void) sprintf(tempId, "[%p]", net); + (void) sprintf(tempId, "[%p]", (void *) net); return tempId; }