libdthelp: Resolve 65 -Wunused-variable warnings
authorPeter Howkins <flibble@users.sf.net>
Fri, 9 Nov 2012 17:20:46 +0000 (17:20 +0000)
committerPeter Howkins <flibble@users.sf.net>
Fri, 9 Nov 2012 17:20:46 +0000 (17:20 +0000)
27 files changed:
cde/lib/DtHelp/Canvas.c
cde/lib/DtHelp/CleanUp.c
cde/lib/DtHelp/CvString.c
cde/lib/DtHelp/FileUtils.c
cde/lib/DtHelp/FormatCCDF.c
cde/lib/DtHelp/FormatSDL.c
cde/lib/DtHelp/FormatTerm.c
cde/lib/DtHelp/GifUtils.c
cde/lib/DtHelp/GlobSearch.c
cde/lib/DtHelp/Graphics.c
cde/lib/DtHelp/HelpDialog.c
cde/lib/DtHelp/HelpQuickD.c
cde/lib/DtHelp/HelpUtil.c
cde/lib/DtHelp/HourGlass.c
cde/lib/DtHelp/JpegUtils.c
cde/lib/DtHelp/Layout.c
cde/lib/DtHelp/LayoutUtil.c
cde/lib/DtHelp/Resize.c
cde/lib/DtHelp/Selection.c
cde/lib/DtHelp/XInterface.c
cde/lib/DtHelp/XbmUtils.c
cde/lib/DtHelp/il/ildecompjpeg.c
cde/lib/DtHelp/il/iljpgdedct.c
cde/lib/DtHelp/il/iljpgdehuff.c
cde/lib/DtHelp/il/ilmap.c
cde/lib/DtHelp/il/iltiff.c
cde/lib/DtHelp/il/iltiffread.c

index 6147817b23e7153083e090bb858cf3970cc36afb..fed159bdd6f4a409290dceedecb8baae4cc838ee 100644 (file)
@@ -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);
index afe4951780627ad318ff2b176255d6b386c6ebf0..ab917bd903a7ab73fd84f4bb0c3e7e759b3d3305 100644 (file)
@@ -152,7 +152,6 @@ _DtHelpFreeSegments (
     _DtCvSegment        *topSeg = NULL;
     _DtCvSegment        *topTab = NULL;
     _DtCvSegment       **tableSeg;
-    _DtHelpDARegion     *pReg;
 
     while (seg_list != NULL)
       {
index a44691e4123204828951f5a975eb2f1e8bfaab8b..1e8fd1518eb37f1485d382d4e3e6319e9ad599c1 100644 (file)
@@ -89,7 +89,6 @@ _DtCvStrLen (
     int            type )
 {
     int                   len = 0;
-    const char   *s1;
     const wchar_t *wcs;
 
     if (0 == type)
index 371948d2e3eb810c488361292e11284f5fa1fd9d..bdd85ecb5fda476a9b8d832dff174899fc3d8969 100644 (file)
@@ -81,7 +81,6 @@ const char * _DtHelpFileSuffixList[3] = {
                     NULL };
 
 /******** variables *********/
-static const char * EmptyStr = "";
 #ifdef not_used
 static const char * PeriodStr = ".";
 #endif
index 76ee8c7a36e6522152c0d45917010a9b929a7634..66bf31c37981c4bca7660f677978c6add715eae0 100644 (file)
@@ -4072,7 +4072,6 @@ Format(
     char               *id_string,
     _DtCvTopicPtr      *ret_topic )
 {
-    int                         cnt;
     int                         result  = 0;
     int                         done    = 0;
     char               *charSet = NULL;
index e64072d0b5d970449d318d9c0f0c4877ca7d49fc..34ea16417c22f656d0b636c555d2a8c9bc97093e 100644 (file)
@@ -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;
 
index fae3971e6fd0ebd6c27244ceafb9e625d916b8a9..e117464652afe9e3b52acad9d653d7c490b6e596 100644 (file)
@@ -356,7 +356,6 @@ TermStrDraw (
         mbstowcs(&wcStr[x], string, byte_len);
     else
       {
-       int i;
        wchar_t *wcp = (wchar_t *) string;
 
        while (0 < byte_len)
index d21f869e813a5cd5acb402c87c017a2449a6ed58..ef6e22380251e60c6deb6fcc496dc43e2f1e0d8b 100644 (file)
@@ -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; */
index d4d0914c1d8aaa791603c497a592568ea032e0b8..5d66b70e30a0d1082ca00c094eb2588ed298d0c5 100644 (file)
@@ -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 */
index 6173df221acb71e8e013c63c7559dd759d035fd1..a5c8b1b400e123869476072fd58770e6067632a7 100644 (file)
@@ -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;
 
index 9ba39e9ad6401aec91a62e29a1bbbb8f39031516..408d7773b0f2d4e5f2c6414cc4e4a999cbc83604 100644 (file)
@@ -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;
index fdb41cd871f887cc64e69f5491000c6e49e0eefc..141dd309d539e5a0ce781c792974f024173e33ac 100644 (file)
@@ -196,7 +196,6 @@ static void InitialPopupCB(
 
 
 /* Static variables */
-static char helpOnHelp[] = "Help4Help";
 
 \f
 /* Supported resources for the HelpQuickDialog Widget */
index b5c855e9889ed70673b8caa2c09f4d81e0fb489e..8b8166245c275d50a6b409e8533c541993d282ed 100644 (file)
@@ -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;
 
   /** -------------------------------------------------------------- *
index 373dd0f52d6f97f1404873e8b9b61127977946b5..a9eea7f9a6027f499695370c4ee863462f27388a 100644 (file)
@@ -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;
index 59ef9daef191b97e809222cc8b8011b782ba5336..d5f3c74b1ee1a016eba1f9bf004ce8d6d2985207 100644 (file)
@@ -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; */
 }
 
 /******************************************************************************
index b90c4a8da2e6496b8bd0d7da18777a77c0e584ce..d8bbc807d87d5477bc085a1f850b37f6883b2642 100644 (file)
@@ -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;
index 57f677bb3b397a476ab85a8775a7b6fcf106196e..99b797563abbd33d366dd57d3d23bfcb1ef5718c 100644 (file)
@@ -1996,7 +1996,6 @@ _DtCvCvtSegsToPts (
     _DtCvSegmentI      *saveSeg;
     _DtCvSegmentI      **retSeg;
     _DtCvDspLine       *lines = canvas->txt_lst;
-    _DtCvFlags          flag;
     _DtCvFlags          result = _DtCvSTATUS_NONE;
     _DtCvSelectData    *tmpBeg;
     _DtCvSelectData    *tmpEnd;
index 4a93453d85ba28ffd48da2b760ee222eb3e7a73c..b69462c0e25d2ba9fc73f1db659d2f484883e63c 100644 (file)
@@ -97,8 +97,6 @@ _DtHelpResizeDisplayArea (
     Dimension    tstHeight;
     Dimension    oldWidth;
     Dimension    oldHeight;
-    XEvent      event;
-    XmDrawnButtonCallbackStruct callBack;
     DtHelpDispAreaStruct        *pDAS = (DtHelpDispAreaStruct *) client_data;
 
     /*
index 40493a1ec66d1cb969caa5ce1d9bb2cde6f3583d..7a6e2b190653284272552f438d45fb3bbc915dea 100644 (file)
@@ -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;
 
index f230715187184f40671acc9280293cbfb300dcc3..2db2e79e48cba68a69eb48428dde806500dea1ab 100644 (file)
@@ -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)
index 0c2efae85e6cf6f5358926b0e379a4d586ca63eb..a76d111d8e5093bb5f01452b6eda5602cbf7e4e7 100644 (file)
@@ -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;
 
index a4e7fedd13613c2c93d469e444f529cd3156108b..117d31fe0ac7b4a02e4d7f4776460a700407bf3c 100644 (file)
@@ -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;
index 6d7df3e0efd1c20cafa5732ff1b4dcf822a2bbca..dfa5658de97404cf58cae99032311aa7239d97dc 100644 (file)
@@ -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;
index 1324cd48e9e4ae48c6288d8873f520e21a4837df..c126569b42a10cd4eb25e89ecba772a53c9ded3b 100644 (file)
@@ -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 */
index de96ca87ad9f4c06ba14128d8ce04ef238d8b8f3..fc0301aa2b01f9128fb00354522f8bb7e32704b4 100644 (file)
@@ -199,7 +199,6 @@ ilPipeInfo              info;
 ilImageDes              des;
 ilImageFormat           format;
 ilImageInfo            *pInfo;
-long                    width, height;
 int                     i;
 ilError               (*executeProc) ();
 
index ddd4a53898b3b994180a51a0748ee08beb21bc72..3263fed69c5ca8cf8d7987e72522d7f127a0e092 100644 (file)
@@ -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;
index e5e57008c88481320a8485a78b7bbf7bb19962cb..315525a4895e8e493e33d6870c88bb6550471c6d 100644 (file)
@@ -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.