gcc11 -Wall -Wpedantic cleanup
This commit is contained in:
parent
3df2aaaa16
commit
07f9bbe1fb
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue