From: Peter Howkins Date: Fri, 9 Nov 2012 17:20:46 +0000 (+0000) Subject: libdthelp: Resolve 65 -Wunused-variable warnings X-Git-Tag: 2.2.0d~35 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=21feacd1598e04594886ab17dd88dba699e0b5e4;p=oweals%2Fcde.git libdthelp: Resolve 65 -Wunused-variable warnings --- diff --git a/cde/lib/DtHelp/Canvas.c b/cde/lib/DtHelp/Canvas.c index 6147817b..fed159bd 100644 --- a/cde/lib/DtHelp/Canvas.c +++ b/cde/lib/DtHelp/Canvas.c @@ -1722,7 +1722,6 @@ _DtCvDrawSegments( short image_offset = _DtCvFALSE; _DtCvUnit segWidth; _DtCvUnit yPos; - _DtCvValue junk; void *pChar; _DtCvFlags saveEnd = new_flag & (_DtCvTRAVERSAL_END | _DtCvLINK_END | _DtCvMARK_END); diff --git a/cde/lib/DtHelp/CleanUp.c b/cde/lib/DtHelp/CleanUp.c index afe49517..ab917bd9 100644 --- a/cde/lib/DtHelp/CleanUp.c +++ b/cde/lib/DtHelp/CleanUp.c @@ -152,7 +152,6 @@ _DtHelpFreeSegments ( _DtCvSegment *topSeg = NULL; _DtCvSegment *topTab = NULL; _DtCvSegment **tableSeg; - _DtHelpDARegion *pReg; while (seg_list != NULL) { diff --git a/cde/lib/DtHelp/CvString.c b/cde/lib/DtHelp/CvString.c index a44691e4..1e8fd151 100644 --- a/cde/lib/DtHelp/CvString.c +++ b/cde/lib/DtHelp/CvString.c @@ -89,7 +89,6 @@ _DtCvStrLen ( int type ) { int len = 0; - const char *s1; const wchar_t *wcs; if (0 == type) diff --git a/cde/lib/DtHelp/FileUtils.c b/cde/lib/DtHelp/FileUtils.c index 371948d2..bdd85ecb 100644 --- a/cde/lib/DtHelp/FileUtils.c +++ b/cde/lib/DtHelp/FileUtils.c @@ -81,7 +81,6 @@ const char * _DtHelpFileSuffixList[3] = { NULL }; /******** variables *********/ -static const char * EmptyStr = ""; #ifdef not_used static const char * PeriodStr = "."; #endif diff --git a/cde/lib/DtHelp/FormatCCDF.c b/cde/lib/DtHelp/FormatCCDF.c index 76ee8c7a..66bf31c3 100644 --- a/cde/lib/DtHelp/FormatCCDF.c +++ b/cde/lib/DtHelp/FormatCCDF.c @@ -4072,7 +4072,6 @@ Format( char *id_string, _DtCvTopicPtr *ret_topic ) { - int cnt; int result = 0; int done = 0; char *charSet = NULL; diff --git a/cde/lib/DtHelp/FormatSDL.c b/cde/lib/DtHelp/FormatSDL.c index e64072d0..34ea1641 100644 --- a/cde/lib/DtHelp/FormatSDL.c +++ b/cde/lib/DtHelp/FormatSDL.c @@ -4420,7 +4420,6 @@ CompressLinkSeg( _DtCvSegment *p_seg) { void *pChar; - wchar_t fChar; int wcFlag; /* @@ -4461,7 +4460,6 @@ CompressLinkSeg( strmove(((char *)pChar), &(((char *)pChar)[1])); else { - int i; wchar_t *wcChar = (wchar_t *) pChar; while (0 != wcChar[0]) @@ -10106,7 +10104,6 @@ _DtHelpCeFrmtSDLVolTitleToAscii( { char *abbrev = NULL; int result = 0; - int done = 0; _DtCvSegment *pHeadSeg; _DtHelpCeLockInfo lockInfo; diff --git a/cde/lib/DtHelp/FormatTerm.c b/cde/lib/DtHelp/FormatTerm.c index fae3971e..e1174646 100644 --- a/cde/lib/DtHelp/FormatTerm.c +++ b/cde/lib/DtHelp/FormatTerm.c @@ -356,7 +356,6 @@ TermStrDraw ( mbstowcs(&wcStr[x], string, byte_len); else { - int i; wchar_t *wcp = (wchar_t *) string; while (0 < byte_len) diff --git a/cde/lib/DtHelp/GifUtils.c b/cde/lib/DtHelp/GifUtils.c index d21f869e..ef6e2238 100644 --- a/cde/lib/DtHelp/GifUtils.c +++ b/cde/lib/DtHelp/GifUtils.c @@ -1040,6 +1040,7 @@ static int dither_8X8[8][8] = //}; */ +/* static int dither_4X4[4][4] = { { 0, 8, 2, 10 }, @@ -1062,6 +1063,7 @@ static int dither_2X2[2][2] = { 0, 2 }, { 3, 1} }; +*/ /*static int dither_matrix_sz = 2; */ /*static int dither_matrix_sz = 4; */ diff --git a/cde/lib/DtHelp/GlobSearch.c b/cde/lib/DtHelp/GlobSearch.c index d4d0914c..5d66b70e 100644 --- a/cde/lib/DtHelp/GlobSearch.c +++ b/cde/lib/DtHelp/GlobSearch.c @@ -750,7 +750,6 @@ static int HitTopicsDisplay ( { XmString * pTopicString; XmString prefixString; - XmString labelString; XmString *items; char * tmpStr; int i; @@ -4922,10 +4921,12 @@ void _DtHelpGlobSrchDisplayDialog( DtHelpDialogWidget hw = (DtHelpDialogWidget) w; XmToggleButtonCallbackStruct status; /* the call data */ Widget sourceBtn; /* widget owning event */ +#if 0 Dimension height; Dimension width; - XmString labelString = NULL; int n; +#endif + XmString labelString = NULL; Arg args[10]; /* make the dialog itself */ diff --git a/cde/lib/DtHelp/Graphics.c b/cde/lib/DtHelp/Graphics.c index 6173df22..a5c8b1b4 100644 --- a/cde/lib/DtHelp/Graphics.c +++ b/cde/lib/DtHelp/Graphics.c @@ -1796,10 +1796,8 @@ static enum _DtGrLoadStatus processXpm( int i, j; int result; short done; - Pixmap pixmap = 0; XpmAttributes xpmAttr; Visual vis2; - XGCValues gcvalues; float ratio = 1.0; enum _DtGrLoadStatus status = _DtGrSUCCESS; @@ -2384,7 +2382,6 @@ _DtHelpProcessGraphic( unsigned int pixWidth = 0; unsigned int pixHeight = 0; Dimension pWidth, pHeight; - char *ptr; Pixmap pix = 0, mask = 0; _DtGrStream stream; Screen *scrptr = ScreenOfDisplay (dpy, screen); @@ -2874,7 +2871,6 @@ size_t _DtGrRead( size_t num_items, _DtGrStream *stream) { - size_t num_items_read; unsigned nleft; int n; diff --git a/cde/lib/DtHelp/HelpDialog.c b/cde/lib/DtHelp/HelpDialog.c index 9ba39e9a..408d7773 100644 --- a/cde/lib/DtHelp/HelpDialog.c +++ b/cde/lib/DtHelp/HelpDialog.c @@ -2121,7 +2121,6 @@ void _DtHelpUpdateDisplayArea( char *userErrorStr=NULL; char *sysErrorStr=NULL; char *tmpMsg=NULL; - char *retTitle; XmString labelString; Arg args[10]; int n=0; diff --git a/cde/lib/DtHelp/HelpQuickD.c b/cde/lib/DtHelp/HelpQuickD.c index fdb41cd8..141dd309 100644 --- a/cde/lib/DtHelp/HelpQuickD.c +++ b/cde/lib/DtHelp/HelpQuickD.c @@ -196,7 +196,6 @@ static void InitialPopupCB( /* Static variables */ -static char helpOnHelp[] = "Help4Help"; /* Supported resources for the HelpQuickDialog Widget */ diff --git a/cde/lib/DtHelp/HelpUtil.c b/cde/lib/DtHelp/HelpUtil.c index b5c855e9..8b816624 100644 --- a/cde/lib/DtHelp/HelpUtil.c +++ b/cde/lib/DtHelp/HelpUtil.c @@ -123,7 +123,7 @@ static void CloseDefBoxCB( #define HUSET 8 /* message catalog set */ /******** static variables ********/ -static char DirSlash[] = "/"; + /******** data structures ********/ typedef struct ExecContext @@ -865,7 +865,6 @@ int _DtHelpFilterExecCmd( XmString labelString2; Widget noexecBtn; Widget execBtn; - Cursor cursor; goodCmd = _DtHelpFilterExecCmdStr(helpWidget, executionPolicy, commandStr, &filteredCmdStr, &invalidAlias, @@ -1003,7 +1002,6 @@ void _DtHelpExecFilteredCmd( Boolean queryNeeded; char * filteredCmdStr = NULL; ExecContext * execContext; - DtHelpListStruct *pHelpInfo; XmString labelString; XmString labelString2; Widget msgDlg; @@ -1023,7 +1021,9 @@ void _DtHelpExecFilteredCmd( following code can fail on IBM platform when XTHREADS and XUSE_MTSAFE_API are defined. */ +/* _Xgetpwparams pwd_buf; +*/ struct passwd * pwd_ret; /** -------------------------------------------------------------- * diff --git a/cde/lib/DtHelp/HourGlass.c b/cde/lib/DtHelp/HourGlass.c index 373dd0f5..a9eea7f9 100644 --- a/cde/lib/DtHelp/HourGlass.c +++ b/cde/lib/DtHelp/HourGlass.c @@ -180,7 +180,6 @@ GetNoEnterCursor( Pixmap pixmap; Pixmap maskPixmap; XColor xcolors[2]; - int scr; unsigned int cWidth; unsigned int cHeight; int useLargeCursors = 0; @@ -284,7 +283,6 @@ _DtHelpGetHourGlassCursor( Pixmap pixmap; Pixmap maskPixmap; XColor xcolors[2]; - int scr; unsigned int cWidth; unsigned int cHeight; int useLargeCursors = 0; diff --git a/cde/lib/DtHelp/JpegUtils.c b/cde/lib/DtHelp/JpegUtils.c index 59ef9dae..d5f3c74b 100644 --- a/cde/lib/DtHelp/JpegUtils.c +++ b/cde/lib/DtHelp/JpegUtils.c @@ -137,13 +137,15 @@ static void my_error_exit (j_common_ptr cinfo) *****************************************************************************/ static void my_output_message (j_common_ptr cinfo) { - char buffer[JMSG_LENGTH_MAX]; - /* ** Uncommenting the lines below will cause error and warning messages ** from the JPEG library to be displayed to stderr instead of suppressed */ + /* + ** char buffer[JMSG_LENGTH_MAX]; + */ + /* ** Create the message ** @@ -169,7 +171,7 @@ static void my_output_message (j_common_ptr cinfo) static void init_source ( j_decompress_ptr cinfo) { - stream_src_ptr src = (stream_src_ptr) cinfo->src; +/* stream_src_ptr src = (stream_src_ptr) cinfo->src; */ } /****************************************************************************** diff --git a/cde/lib/DtHelp/Layout.c b/cde/lib/DtHelp/Layout.c index b90c4a8d..d8bbc807 100644 --- a/cde/lib/DtHelp/Layout.c +++ b/cde/lib/DtHelp/Layout.c @@ -2121,7 +2121,6 @@ ProcessTable( int saveTravCnt = canvas->trav_cnt; _DtCvUnit workWidth; _DtCvUnit newLeft; - _DtCvUnit rightMargin = 0; _DtCvUnit saveLeft = layout->left; _DtCvUnit saveYpos = layout->info.y_pos; _DtCvUnit tableYpos; @@ -2141,7 +2140,6 @@ ProcessTable( _DtCvFrmtOption *colJustSpec; _DtCvValue oldFound = layout->id_found; - _DtCvValue haveHeads = False; _DtCvValue haveBrds = False; _DtCvValue saveState = layout->table_flag; _DtCvValue saveAlignFlag = layout->info.align_flag; @@ -3187,7 +3185,6 @@ ProcessController( int saveTravCnt = canvas->trav_cnt; _DtCvUnit saveYPos = layout->info.y_pos; _DtCvUnit saveMaxWidth = layout->max_width; - _DtCvUnit saveY = layout->info.y_pos; _DtCvUnit saveLeft = layout->left; _DtCvUnit saveRight = layout->right; _DtCvUnit maxWidth; @@ -3742,10 +3739,6 @@ ProcessContainer( int *ret_cnt) { int getLn; - int saveTravCnt = canvas->trav_cnt; - int saveLnCnt = canvas->line_cnt; - int saveTxtCnt = canvas->txt_cnt; - int joinLine = layout->info.join_line; const char *saveJustifyChar = layout->info.align_char; _DtCvUnit yPad = 0; _DtCvUnit xPad = 0; @@ -3758,9 +3751,6 @@ ProcessContainer( _DtCvUnit saveFirst = layout->first; _DtCvUnit saveYpos = layout->info.y_pos; _DtCvValue saveStatic = layout->stat_flag; - _DtCvValue botBrdr = False; - _DtCvValue rightBrdr = False; - _DtCvValue joinFlag = layout->info.join; _DtCvValue saveBrdr = layout->brdr_flag; _DtCvFrmtOption saveJustify = layout->txt_justify; LayFrmtInfo frmtInfo; @@ -5093,14 +5083,10 @@ CheckMoveInfo ( LayoutInfo *layout) { int i; - int txt_idx; - int ln_idx; _DtCvUnit topY; _DtCvUnit botY; - _DtCvUnit space; _DtCvUnit maxWidth = canvas->metrics.width; GrpInfo *nxtGrp; - GrpInfo *grp; /* * fill in the max x of each group @@ -5542,8 +5528,6 @@ _DtCanvasResize ( _DtCvStatus selectStatus; _DtCvStatus retStatus = _DtCvSTATUS_NONE; _DtCanvasStruct *canvas = (_DtCanvasStruct *) canvas_handle; - _DtCvSpaceMetrics oldLink = canvas->link_info; - _DtCvSpaceMetrics oldTrav = canvas->traversal_info; _DtCvUnit oldWidth = canvas->metrics.width; LayoutInfo layOut; _DtCvPointInfo selPt; @@ -5650,7 +5634,6 @@ _DtCanvasSetTopic ( _DtCvUnit *ret_height, _DtCvUnit *ret_y ) { - int i; _DtCvStatus result = _DtCvSTATUS_OK; _DtCanvasStruct *canvas = (_DtCanvasStruct *) canvas_handle; LayoutInfo layOut; diff --git a/cde/lib/DtHelp/LayoutUtil.c b/cde/lib/DtHelp/LayoutUtil.c index 57f677bb..99b79756 100644 --- a/cde/lib/DtHelp/LayoutUtil.c +++ b/cde/lib/DtHelp/LayoutUtil.c @@ -1996,7 +1996,6 @@ _DtCvCvtSegsToPts ( _DtCvSegmentI *saveSeg; _DtCvSegmentI **retSeg; _DtCvDspLine *lines = canvas->txt_lst; - _DtCvFlags flag; _DtCvFlags result = _DtCvSTATUS_NONE; _DtCvSelectData *tmpBeg; _DtCvSelectData *tmpEnd; diff --git a/cde/lib/DtHelp/Resize.c b/cde/lib/DtHelp/Resize.c index 4a93453d..b69462c0 100644 --- a/cde/lib/DtHelp/Resize.c +++ b/cde/lib/DtHelp/Resize.c @@ -97,8 +97,6 @@ _DtHelpResizeDisplayArea ( Dimension tstHeight; Dimension oldWidth; Dimension oldHeight; - XEvent event; - XmDrawnButtonCallbackStruct callBack; DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data; /* diff --git a/cde/lib/DtHelp/Selection.c b/cde/lib/DtHelp/Selection.c index 40493a1e..7a6e2b19 100644 --- a/cde/lib/DtHelp/Selection.c +++ b/cde/lib/DtHelp/Selection.c @@ -571,7 +571,6 @@ BuildLine( _DtCvPointer *ret_data) { _DtCvUnit topY; - _DtCvUnit lastY; _DtCvDspLine *lines = canvas->txt_lst; _DtCvStringInfo strInfo = { NULL, 0, 1, NULL }; @@ -691,7 +690,6 @@ GetSelectedText( { _DtCvUnit maxY; _DtCvUnit botY; - _DtCvUnit lastY; int i; int lineCnt = 0; int junk; @@ -1332,7 +1330,6 @@ _DtCanvasProcessSelection ( _DtCvUnit y, _DtCvSelectMode mode) { - int i; _DtCanvasStruct *canvas = (_DtCanvasStruct *) canvas_handle; _DtCvSelectData temp; diff --git a/cde/lib/DtHelp/XInterface.c b/cde/lib/DtHelp/XInterface.c index f2307151..2db2e79e 100644 --- a/cde/lib/DtHelp/XInterface.c +++ b/cde/lib/DtHelp/XInterface.c @@ -2108,7 +2108,6 @@ _DtHelpDADestroyGraphic ( _DtCvPointer graphic_ptr ) { Arg args[5]; - int i; Colormap colormap; @@ -2179,7 +2178,6 @@ _DtHelpDADestroyRegion ( _DtCvPointer client_data, _DtCvPointer reg_info) { - DtHelpDispAreaStruct *pDAS = (DtHelpDispAreaStruct *) client_data; _DtHelpDARegion *pReg = (_DtHelpDARegion *) reg_info; if (True == pReg->inited) diff --git a/cde/lib/DtHelp/XbmUtils.c b/cde/lib/DtHelp/XbmUtils.c index 0c2efae8..a76d111d 100644 --- a/cde/lib/DtHelp/XbmUtils.c +++ b/cde/lib/DtHelp/XbmUtils.c @@ -310,7 +310,6 @@ int _DtGrReadBitmapStream (display, d, stream, width, height, pixmap, x_hot, y_h int *x_hot, *y_hot; /* RETURNED */ #endif { - Pixmap pix; /* value to return */ unsigned char *data; int res; diff --git a/cde/lib/DtHelp/il/ildecompjpeg.c b/cde/lib/DtHelp/il/ildecompjpeg.c index a4e7fedd..117d31fe 100644 --- a/cde/lib/DtHelp/il/ildecompjpeg.c +++ b/cde/lib/DtHelp/il/ildecompjpeg.c @@ -154,7 +154,6 @@ static ilError ilDecompJIFExecute ( register ilJPEGPrivPtr pPriv; ilError error; int i; - iljpgPtr pJPEGPriv; iljpgPtr pPixels[ILJPG_MAX_COMPS]; long nBytesPerRow[ILJPG_MAX_COMPS]; ilImagePlaneInfo *pPlane; diff --git a/cde/lib/DtHelp/il/iljpgdedct.c b/cde/lib/DtHelp/il/iljpgdedct.c index 6d7df3e0..dfa5658d 100644 --- a/cde/lib/DtHelp/il/iljpgdedct.c +++ b/cde/lib/DtHelp/il/iljpgdedct.c @@ -254,7 +254,6 @@ void _iljpgDeDCTFull ( ) { register int i; - register float *oxptr; register int *zptr; float ox[64]; register float in0, in1, in2, in3, in4, in5, in6, in7; @@ -551,7 +550,7 @@ void _iljpgDeDCT4x4 ( register int i; register int *zptr; float ox[64]; - register float in0, in2, in3, in4, in5, in6, in7; + register float in0, in2, in3, in4, in5, in7; register float tmp0, tmp1, tmp2, tmp5, tmp6, tmp7; register float tmp; register float *oxaddr; diff --git a/cde/lib/DtHelp/il/iljpgdehuff.c b/cde/lib/DtHelp/il/iljpgdehuff.c index 1324cd48..c126569b 100644 --- a/cde/lib/DtHelp/il/iljpgdehuff.c +++ b/cde/lib/DtHelp/il/iljpgdehuff.c @@ -490,7 +490,7 @@ iljpgError _iljpgDehuffExecute ( iljpgDehuffPtr pHuffPriv; int coeff_ct = 0; #define is_dc (!coeff_ct) /* First coefficient is DC */ - int i, delta; + int delta; int len, zrun; register BITBUF bitbuf, ch, c; register int bitsleft; @@ -556,7 +556,6 @@ iljpgError _iljpgDehuffExecute ( next byte (which can't be a marker or error!); set into bitbuf. */ if (pHuffPriv->resetDone) { - int resetSeen = FALSE; pHuffPriv->resetDone = 0; if (!ILJPG_DECODE_GET_BYTE (stream, ch, error)) return error; /* must be more bytes after restart */ diff --git a/cde/lib/DtHelp/il/ilmap.c b/cde/lib/DtHelp/il/ilmap.c index de96ca87..fc0301aa 100644 --- a/cde/lib/DtHelp/il/ilmap.c +++ b/cde/lib/DtHelp/il/ilmap.c @@ -199,7 +199,6 @@ ilPipeInfo info; ilImageDes des; ilImageFormat format; ilImageInfo *pInfo; -long width, height; int i; ilError (*executeProc) (); diff --git a/cde/lib/DtHelp/il/iltiff.c b/cde/lib/DtHelp/il/iltiff.c index ddd4a538..3263fed6 100644 --- a/cde/lib/DtHelp/il/iltiff.c +++ b/cde/lib/DtHelp/il/iltiff.c @@ -981,7 +981,7 @@ ilError error; long imageSequenceNumber; ilByte fourBytes [4]; ilFileOffset IFDOffset; -ilFileImagePtr pFileImage, pFileImageHead, pPrevFileImage; +ilFileImagePtr pFileImage, pPrevFileImage; ilTIFFHeader header; register ilFilePtr pFile; register ilBool bigEndian; diff --git a/cde/lib/DtHelp/il/iltiffread.c b/cde/lib/DtHelp/il/iltiffread.c index e5e57008..315525a4 100644 --- a/cde/lib/DtHelp/il/iltiffread.c +++ b/cde/lib/DtHelp/il/iltiffread.c @@ -155,7 +155,6 @@ static ilError ilReadFileInit ( register ilReadFilePrivPtr pPriv = (ilReadFilePrivPtr)pPrivate; ilFileImagePtr pFileImage; ilError error; -long dstRowBytes; register ilFileTag *pTag; /* Data for tags to read: "numbers" is the array of tag ids, "nTags" in length.