compiler warnings

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

1 post / 0 new
compiler warnings

Submitted by Anonymous on Sat, 11/04/2000 - 13:42.

I have been posting my concerns to the osf developers mailing list. Apparently
no one who cares is subscribed to it, so I`ll try again here. Some of these are bogus, but enough of them are a concern that they _all_ need to be investigated. If you can easily tell that they are not important it is equally easy to let the compiler know that you know it is correct!! If you can`t easily figure it out, odds are that some situation is going to cause problems!!!

CutPaste.c In function `ClipboardRequestDataAndWait`
CutPaste.c2470 warning `app_context` might be used uninitialized in this function

Call to XtAppAddTimeOut with a random value for app_context

GadgetUtil.c In function `_XmDispatchGadgetInput`
GadgetUtil.c220 warning suggest explicit braces to avoid ambiguous `else`
LabelG.c In function `Resize`
LabelG.c1399 warning suggest explicit braces to avoid ambiguous `else`

List.c In function `SetVerticalScrollbar`
List.c2808 warning `return` with no value, in function returning non-void

The return value is used in at least 1 location

List.c In function `SetHorizontalScrollbar`
List.c2892 warning `return` with no value, in function returning non-void

The return value is never used.

MenuUtil.c In function `_XmGrabPointer`
MenuUtil.c149 warning `status` might be used uninitialized in this function
MenuUtil.c In function `_XmGrabKeyboard`
MenuUtil.c177 warning `status` might be used uninitialized in this function

These don`t seem to be a real problem. But initialize them simply to let
the compiler know that you know what you`re doing.....

Text.c In function `SetValues`
Text.c2551 warning `cache_source` might be used uninitialized in this function

Text.c In function `XmTextGetString`
Text.c3838 warning `text_copy` might be used uninitialized in this function
Text.c In function `XmTextGetStringWcs`
Text.c3859 warning `text_copy` might be used uninitialized in this function

These can return a random pointer off the stack, which the user is supposed
to XtFree!!!!!!

TextIn.c In function `KeySelection`
TextIn.c1700 warning suggest explicit braces to avoid ambiguous `else`
TextIn.c In function `SetNavigationAnchor`
TextIn.c1858 warning suggest parentheses around && within ||
TextIn.c1875 warning suggest parentheses around && within ||
TextStrSo.c In function `Scan`
TextStrSo.c1361 warning enumeration value `XmSELECT_OUT_LINE` not handled in switch
XmString.c In function `XmStringConcatAndFree`
XmString.c1754 warning suggest explicit braces to avoid ambiguous `else`
XmString.c1419 warning `b_seg` might be used uninitialized in this function
XmString.c In function `LineMetrics`
XmString.c2470 warning `lay_dir` might be used uninitialized in this function
XmString.c In function `recursive_layout`
XmString.c4055 warning `pop_dir` might be used uninitialized in this function
XmString.c In function `SpecifiedSegmentExtents`
XmString.c6158 warning `tags` might be used uninitialized in this function
XmString.c6159 warning `tag_count` might be used uninitialized in this function
XmString.c In function `XmeStringGetComponent`
XmString.c8460 warning `tag` might be used uninitialized in this function
XmString.c8461 warning `char_count` might be used uninitialized in this function
XmString.c8462 warning `text_type` might be used uninitialized in this function
XmString.c8463 warning `seg_text` might be used uninitialized in this function
XmString.c8464 warning `begin_rends` might be used uninitialized in this function
XmString.c8465 warning `begin_count` might be used uninitialized in this function
XmString.c8466 warning `end_rends` might be used uninitialized in this function
XmString.c8467 warning `end_count` might be used uninitialized in this function
TextF.c In function `InsertChar`
TextF.c3744 warning `cursorPos` might be used uninitialized in this function
TextF.c3744 warning `nextPos` might be used uninitialized in this function
TextF.c In function `SetNavigationAnchor`
TextF.c4195 warning suggest parentheses around && within ||
TextF.c4211 warning suggest parentheses around && within ||
TextF.c In function `PreeditDraw`
TextF.c8958 warning implicit declaration of function `wcschr`
TextF.c9092 warning implicit declaration of function `wcscpy`
TextF.c9100 warning implicit declaration of function `wcscat`
TextF.c9106 warning implicit declaration of function `wcslen`
TextF.c9120 warning implicit declaration of function `wcsncat`
TextF.c8883 warning `over_mb` might be used uninitialized in this function
TextF.c8884 warning `over_wc` might be used uninitialized in this function
TextF.c8885 warning `rest_len` might be used uninitialized in this function
TextFSel.c In function `DoStuff`
TextFSel.c1118 warning `cursorPos` might be used uninitialized in this function
TraversalI.c In function `Sort`
TraversalI.c1620 warning `might_overlap` might be used uninitialized in this function
TraversalI.c1621 warning `row_len` might be used uninitialized in this function
Xmos.c In function `_XmOSGetDirEntries`
Xmos.c662 warning `readCacheIndex` might be used uninitialized in this function
Xmos.c663 warning `dirFileType` might be used uninitialized in this function
Xmos.c666 warning `comp_status` might be used uninitialized in this function
Draw.c In function `XmeDrawSeparator`
Draw.c389 warning suggest explicit braces to avoid ambiguous `else`
Draw.c432 warning suggest explicit braces to avoid ambiguous `else`
XmIm.c In function `ImPreeditStartCallback`
XmIm.c1448 warning passing arg 1 of pointer to function from incompatible pointer type
XmIm.c In function `ImPreeditDoneCallback`
XmIm.c1475 warning passing arg 1 of pointer to function from incompatible pointer type
XmIm.c In function `ImPreeditDrawCallback`
XmIm.c1608 warning passing arg 1 of pointer to function from incompatible pointer type
XmIm.c In function `ImPreeditCaretCallback`
XmIm.c1648 warning enumeration value `XIMForwardWord` not handled in switch
XmIm.c1648 warning enumeration value `XIMBackwardWord` not handled in switch
XmIm.c1648 warning enumeration value `XIMCaretUp` not handled in switch
XmIm.c1648 warning enumeration value `XIMCaretDown` not handled in switch
XmIm.c1648 warning enumeration value `XIMNextLine` not handled in switch
XmIm.c1648 warning enumeration value `XIMPreviousLine` not handled in switch
XmIm.c1648 warning enumeration value `XIMLineStart` not handled in switch
XmIm.c1648 warning enumeration value `XIMLineEnd` not handled in switch
XmIm.c1648 warning enumeration value `XIMDontChange` not handled in switch
XmIm.c1652 warning passing arg 1 of pointer to function from incompatible pointer type
XmIm.c In function `regist_real_callback`
XmIm.c1700 warning `target` might be used uninitialized in this function
XmIm.c In function `set_callback_values`
XmIm.c1752 warning `p` might be used uninitialized in this function
XmIm.c In function `move_preedit_string`
XmIm.c1824 warning passing arg 1 of pointer to function from incompatible pointer type
XmIm.c1828 warning passing arg 1 of pointer to function from incompatible pointer type
XmIm.c1843 warning passing arg 1 of pointer to function from incompatible pointer type
XmIm.c1843 warning passing arg 3 of pointer to function from incompatible pointer type
RCLayout.c In function `LayoutOptionAndSize`
RCLayout.c1421 warning `label_box` might be used uninitialized in this function
RCLayout.c In function `_XmRCAdaptToSize`
RCLayout.c1769 warning `instigator_w` might be used uninitialized in this function
RCLayout.c1770 warning `instigator_h` might be used uninitialized in this function
XmTabList.c In function `_XmCreateTabList`
XmTabList.c222 warning `tl` might be used uninitialized in this function
XmRenderT.c In function `XmRenderTableCvtToProp`
XmRenderT.c2408 warning int format, long int arg (arg 3)
XmRenderT.c2417 warning int format, long int arg (arg 3)
ColorObj.c In function `Initialize`
ColorObj.c413 warning `tmpAtom` might be used uninitialized in this function
ColorObj.c In function `ColorCachePropertyExists`
ColorObj.c705 warning assignment makes integer from pointer without a cast
IconFile.c In function `MakeCachedDirEntry`
IconFile.c181 warning `cachedDir` might be used uninitialized in this function
IconFile.c In function `XmGetIconFileName`
IconFile.c549 warning `absolute` might be used uninitialized in this function
ColObjFunc.c In function `_XmGetPixelData`
ColObjFunc.c92 warning implicit declaration of function `XmeGetPixelData`
XpmWrFFrI.c In function `XmeXpmWriteFileFromXpmImage`
XpmWrFFrI.c118 warning suggest parentheses around assignment used as truth value
XpmWrFFrI.c122 warning suggest parentheses around assignment used as truth value
XpmWrFFrI.c127 warning suggest parentheses around assignment used as truth value
XpmWrFFrI.c134 warning suggest parentheses around assignment used as truth value
Xpmcreate.c In function `CreateColors`
Xpmcreate.c501 warning `colorsymbols` might be used uninitialized in this function
Xpmcreate.c509 warning `symbol` might be used uninitialized in this function
Xpmscan.c In function `XmeXpmCreateXpmImageFromImage`
Xpmscan.c190 warning `ErrorStatus` might be used uninitialized in this function
Xpmscan.c In function `ScanOtherColors`
Xpmscan.c401 warning `colorTable` might be used uninitialized in this function
Xpmscan.c403 warning `apixels` might be used uninitialized in this function
Xpmscan.c404 warning `mask_pixel` might be used uninitialized in this function
Xpmdata.c390 warning missing braces around initializer
Xpmdata.c390 warning (near initialization for `_XmxpmDataTypes[0]`)
Container.c In function `ContainerExpandOrCollapse`
Container.c5094 warning `new_state` might be used uninitialized in this function
Container.c In function `RedirectTraversal`
Container.c8122 warning enumeration value `XmTRAVERSE_CURRENT` not handled in switch
Container.c8122 warning enumeration value `XmTRAVERSE_NEXT_TAB_GROUP` not handled in switch
Container.c8122 warning enumeration value `XmTRAVERSE_PREV_TAB_GROUP` not handled in switch
Container.c8122 warning enumeration value `XmTRAVERSE_GLOBALLY_FORWARD` not handled in switch
Container.c8122 warning enumeration value `XmTRAVERSE_GLOBALLY_BACKWARD` not handled in switch
Container.c In function `MoveItemCallback`
Container.c9186 warning `trial_x` might be used uninitialized in this function
Container.c9186 warning `trial_y` might be used uninitialized in this function
Notebook.c In function `UpdateJoinSide`
Notebook.c2242 warning `side_to_join` might be used uninitialized in this function
Notebook.c In function `LayoutMajorTabs`
Notebook.c2509 warning `top_tab_count` might be used uninitialized in this function
Notebook.c In function `MakeSpiralPixmap`
Notebook.c4197 warning `rx` might be used uninitialized in this function
Notebook.c4197 warning `ry` might be used uninitialized in this function
Notebook.c4197 warning `rw` might be used uninitialized in this function
Notebook.c4197 warning `rh` might be used uninitialized in this function
Notebook.c4198 warning `sx` might be used uninitialized in this function
Notebook.c4198 warning `sy` might be used uninitialized in this function
Notebook.c4198 warning `sw` might be used uninitialized in this function
Notebook.c4198 warning `sh` might be used uninitialized in this function
Notebook.c4198 warning `sd` might be used uninitialized in this function
Notebook.c4199 warning `a1` might be used uninitialized in this function
Notebook.c4199 warning `a2` might be used uninitialized in this function
Notebook.c4199 warning `a3` might be used uninitialized in this function
Notebook.c4199 warning `a4` might be used uninitialized in this function
Notebook.c4200 warning `hx` might be used uninitialized in this function
Notebook.c4200 warning `hy` might be used uninitialized in this function
Notebook.c4200 warning `hd` might be used uninitialized in this function
Notebook.c4201 warning `lx1` might be used uninitialized in this function
Notebook.c4201 warning `ly1` might be used uninitialized in this function
Notebook.c4201 warning `lx2` might be used uninitialized in this function
Notebook.c4201 warning `ly2` might be used uninitialized in this function
Notebook.c4202 warning `pw` might be used uninitialized in this function
Notebook.c4202 warning `ph` might be used uninitialized in this function
Notebook.c In function `RedirectTraversal`
Notebook.c6386 warning `to_type` might be used uninitialized in this function
Notebook.c6386 warning `from_type` might be used uninitialized in this function
SpinB.c In function `LayoutSpinBox`
SpinB.c1634 warning `upX` might be used uninitialized in this function
SpinB.c1635 warning `downX` might be used uninitialized in this function