mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
lidtwidget: Resolve 74 -Wunused-variable warnings
This commit is contained in:
parent
a0da2db479
commit
37c30d32f7
10 changed files with 11 additions and 83 deletions
|
@ -1025,7 +1025,6 @@ _ComboBoxKbdCancel( Widget w,
|
|||
{
|
||||
DtComboBoxWidget combo;
|
||||
XtPointer data;
|
||||
Widget new;
|
||||
Arg args[1];
|
||||
|
||||
/* Get combo-box off list data */
|
||||
|
@ -1462,8 +1461,6 @@ SetValues( DtComboBoxWidget current,
|
|||
{
|
||||
DtComboBoxPart *new_p = (DtComboBoxPart*)
|
||||
&(XmField(new,ipot,DtComboBox,arrow,Widget));
|
||||
DtComboBoxPart *cur_p = (DtComboBoxPart*)
|
||||
&(XmField(current,ipot,DtComboBox,arrow,Widget));
|
||||
Boolean label_size_changed = FALSE;
|
||||
Boolean force_label_string = FALSE;
|
||||
Arg args[10];
|
||||
|
@ -2471,7 +2468,6 @@ activate_cb( Widget w,
|
|||
Position root_x, root_y, root_y0;
|
||||
Arg args[5];
|
||||
int n;
|
||||
XmStringTable list_items;
|
||||
unsigned char unit_type = XmPIXELS;
|
||||
|
||||
/* Resolution Independent Handling */
|
||||
|
@ -2656,7 +2652,6 @@ arrow_expose_cb(Widget w,
|
|||
short center_w;
|
||||
short center_h;
|
||||
XPoint points[10];
|
||||
short min;
|
||||
Arg args[3];
|
||||
GC gc;
|
||||
Dimension arrow_width, arrow_height;
|
||||
|
@ -2733,7 +2728,7 @@ arrow_expose_cb(Widget w,
|
|||
* the user if they requested it. Our losing-focus callback
|
||||
* is just a convenience callback, so that the user doesn't
|
||||
* have to get the text-field first. This make our integration
|
||||
* with XDesigner a little easier.
|
||||
* with XDesigner a little easier.d
|
||||
*/
|
||||
static void
|
||||
text_losing_focus_cb( Widget w,
|
||||
|
|
|
@ -481,7 +481,6 @@ static void
|
|||
CheckFile(
|
||||
DtControlGadget g )
|
||||
{
|
||||
Boolean result;
|
||||
Boolean file_changed;
|
||||
long file_size = 0;
|
||||
struct stat stat_buf;
|
||||
|
@ -604,12 +603,10 @@ DateTimeout(
|
|||
XtAppContext app_context =
|
||||
XtWidgetToApplicationContext ((Widget) g);
|
||||
char sTime[128];
|
||||
_Xltimeparams localtime_buf;
|
||||
struct tm *timeptr;
|
||||
time_t tse;
|
||||
String s1, s2, s3;
|
||||
unsigned long tilMidnight;
|
||||
Boolean old_format = False;
|
||||
XtExposeProc expose;
|
||||
|
||||
/* Get time string.
|
||||
|
@ -765,12 +762,9 @@ Initialize(
|
|||
{
|
||||
DtControlGadget request = (DtControlGadget) request_w,
|
||||
new = (DtControlGadget) new_w;
|
||||
XmManagerWidget mw = (XmManagerWidget) XtParent (new);
|
||||
XtAppContext app_context =
|
||||
XtWidgetToApplicationContext (new_w);
|
||||
String str;
|
||||
int file_name_size;
|
||||
XrmValue pixVal;
|
||||
String str;
|
||||
UpdateGCsProc update_gcs;
|
||||
|
||||
G_MonitorTimer (new) = 0;
|
||||
|
@ -1005,8 +999,7 @@ SetValues(
|
|||
{
|
||||
|
||||
|
||||
DtControlGadget request_c = (DtControlGadget) request_w,
|
||||
current_c = (DtControlGadget) current_w,
|
||||
DtControlGadget current_c = (DtControlGadget) current_w,
|
||||
new_c = (DtControlGadget) new_w;
|
||||
#if 0
|
||||
String file_name = G_FileName (new);
|
||||
|
@ -1302,8 +1295,6 @@ Draw(
|
|||
XRectangle clip;
|
||||
Position p_x, p_y, s_x, s_y;
|
||||
Dimension width = 0, height = 0;
|
||||
unsigned char behavior = G_Behavior (g);
|
||||
Position adj_x, adj_y;
|
||||
Pixmap pix;
|
||||
Pixmap mask;
|
||||
int index;
|
||||
|
@ -1847,7 +1838,6 @@ _DtControlDoPushAnimation(
|
|||
Widget w )
|
||||
{
|
||||
DtControlGadget g = (DtControlGadget) w;
|
||||
XtAppContext app_context = XtWidgetToApplicationContext (w);
|
||||
|
||||
if ((G_NumPushImages (g) > 0) && (G_PushImagePosition (g) == 0))
|
||||
{
|
||||
|
@ -1869,10 +1859,7 @@ _DtControlAddPushAnimationImage(
|
|||
int delay )
|
||||
{
|
||||
DtControlGadget g = (DtControlGadget) w;
|
||||
XmManagerWidget mw = (XmManagerWidget) XtParent (w);
|
||||
int i;
|
||||
XGCValues values;
|
||||
XtGCMask value_mask;
|
||||
|
||||
/* Allocate blocks of animation data.
|
||||
*/
|
||||
|
@ -1940,7 +1927,6 @@ _DtControlDoDropAnimation(
|
|||
Widget w )
|
||||
{
|
||||
DtControlGadget g = (DtControlGadget) w;
|
||||
XtAppContext app_context = XtWidgetToApplicationContext (w);
|
||||
|
||||
if ((G_NumDropImages (g) > 0) && (G_DropImagePosition (g) == 0))
|
||||
{
|
||||
|
@ -1962,10 +1948,7 @@ _DtControlAddDropAnimationImage(
|
|||
int delay )
|
||||
{
|
||||
DtControlGadget g = (DtControlGadget) w;
|
||||
XmManagerWidget mw = (XmManagerWidget) XtParent (w);
|
||||
int i;
|
||||
XGCValues values;
|
||||
XtGCMask value_mask;
|
||||
|
||||
/* Allocate blocks of animation data.
|
||||
*/
|
||||
|
|
|
@ -382,12 +382,7 @@ Initialize(
|
|||
Widget request_w,
|
||||
Widget new_w )
|
||||
{
|
||||
DtDialogBoxWidget request = (DtDialogBoxWidget) request_w,
|
||||
new = (DtDialogBoxWidget) new_w;
|
||||
Widget sep;
|
||||
|
||||
Arg al[20]; /* arg list */
|
||||
register int ac; /* arg count */
|
||||
DtDialogBoxWidget new = (DtDialogBoxWidget) new_w;
|
||||
XtWidgetProc create_children;
|
||||
|
||||
if (M_ButtonCount (new) > 0)
|
||||
|
@ -437,10 +432,6 @@ SetValues(
|
|||
Widget request_w,
|
||||
Widget new_w )
|
||||
{
|
||||
DtDialogBoxWidget current = (DtDialogBoxWidget) current_w,
|
||||
request = (DtDialogBoxWidget) request_w,
|
||||
new = (DtDialogBoxWidget) new_w;
|
||||
|
||||
Boolean redraw_flag = False;
|
||||
|
||||
/* Superclass does all the work so far; checks for redisplay, etc.
|
||||
|
@ -641,7 +632,7 @@ GetSize(
|
|||
i;
|
||||
Boolean min_btns = M_MinimizeButtons (mgr);
|
||||
Dimension sep_h = 0,
|
||||
b_h, offset = OFFSET, pad,
|
||||
offset = OFFSET, pad,
|
||||
max_w = 0, max_h = 0,
|
||||
s_t = M_ShadowThickness (mgr);
|
||||
XtWidgetGeometry request, reply;
|
||||
|
|
|
@ -451,7 +451,6 @@ insertDataValue(
|
|||
XmTextPosition beginInsert,
|
||||
XmTextPosition endInsert)
|
||||
{
|
||||
char *textData;
|
||||
DtEditorErrorCode status = DtEDITOR_NULL_ITEM, loadError;
|
||||
|
||||
/*
|
||||
|
@ -1043,7 +1042,6 @@ _DtEditorValidateFileAccess(
|
|||
int accessType )
|
||||
{
|
||||
struct stat statbuf; /* Information on a file. */
|
||||
unsigned short tmpMode;
|
||||
|
||||
DtEditorErrorCode error = DtEDITOR_INVALID_FILENAME;
|
||||
|
||||
|
@ -1192,7 +1190,6 @@ LoadFile(
|
|||
XmTextPosition endReplace )
|
||||
|
||||
{
|
||||
DtEditorWidget editor = (DtEditorWidget) w;
|
||||
DtEditorContentRec cr; /* Structure for passing data to widget */
|
||||
struct stat statbuf; /* Information on a file. */
|
||||
int file_length; /* Length of file. */
|
||||
|
@ -1390,7 +1387,7 @@ CopySubstring(
|
|||
Boolean addNewlines)
|
||||
{
|
||||
register XmTextLineTable line_table = widget->text.line_table;
|
||||
int last_line_index, currLine, firstLine;
|
||||
int currLine, firstLine;
|
||||
char *pString, *pCurrChar, *pLastChar;
|
||||
int numToCopy;
|
||||
|
||||
|
@ -1534,9 +1531,6 @@ _DtEditorCopyDataOut(
|
|||
char *buf,
|
||||
Boolean addNewlines)
|
||||
{
|
||||
XmTextPosition curCharNum;
|
||||
DtEditorWidget editor = M_editor(tw);
|
||||
|
||||
buf = CopySubstring(tw, 0, tw->text.last_position, buf, addNewlines);
|
||||
|
||||
return buf;
|
||||
|
@ -1759,7 +1753,6 @@ DtEditorSaveContentsToFile(
|
|||
Boolean markContentsAsSaved )
|
||||
{
|
||||
|
||||
struct stat statbuf; /* Information on a file. */
|
||||
FILE *pFile;
|
||||
DtEditorContentRec cr; /* Structure for retrieving contents of widget */
|
||||
DtEditorWidget editor = (DtEditorWidget) widget;
|
||||
|
|
|
@ -4013,11 +4013,9 @@ Editor_SetSelectionProc(
|
|||
Time set_time )
|
||||
{
|
||||
XmSourceData data = source->data;
|
||||
int i;
|
||||
Widget widget;
|
||||
XmTextWidget tw;
|
||||
DtEditorWidget editor;
|
||||
DtEditorSelectCallbackStruct select_cb;
|
||||
|
||||
|
||||
/*
|
||||
|
@ -4212,7 +4210,6 @@ TransferCallback(
|
|||
|
||||
DtDndTransferCallbackStruct *transferInfo =
|
||||
(DtDndTransferCallbackStruct *) call_data;
|
||||
DtEditorWidget editor = (DtEditorWidget) client_data;
|
||||
|
||||
transferInfo->status = DtDND_SUCCESS;
|
||||
|
||||
|
|
|
@ -3635,7 +3635,6 @@ LoadPixmap(
|
|||
String pixmap )
|
||||
|
||||
{
|
||||
Display * display = XtDisplay(new);
|
||||
unsigned int int_h, int_w;
|
||||
Screen *s = XtScreen(new);
|
||||
Pixmap pm = XmGetPixmap(s, pixmap, G_PixmapForeground(new),
|
||||
|
@ -3955,7 +3954,6 @@ AnimateCallback(
|
|||
XtPointer clientData,
|
||||
XtPointer callData )
|
||||
{
|
||||
DtDndDropAnimateCallback call_data = (DtDndDropAnimateCallback) callData;
|
||||
DtIconGadget g = (DtIconGadget) w;
|
||||
|
||||
if (G_DropCallback(g)) {
|
||||
|
|
|
@ -745,7 +745,6 @@ Destroy(
|
|||
DtMenuButtonWidget mb = (DtMenuButtonWidget) wid ;
|
||||
XmRowColumnWidget submenu = (XmRowColumnWidget) MB_SMENU(mb);
|
||||
Widget shell;
|
||||
Display *dpy = XtDisplay(wid);
|
||||
|
||||
XtRemoveAllCallbacks ((Widget) mb, DtNcascadingCallback);
|
||||
|
||||
|
@ -799,7 +798,6 @@ SetValues(
|
|||
Boolean adjustWidth = FALSE;
|
||||
Boolean adjustHeight = FALSE;
|
||||
unsigned char rowcol_type = 0;
|
||||
Display *dpy = XtDisplay(nw);
|
||||
Boolean menu_glyph_changed = FALSE;
|
||||
|
||||
if (MB_SMENU(new_w) != (Widget)NULL) {
|
||||
|
|
|
@ -908,7 +908,6 @@ _DtEditorDialogReplaceCB(
|
|||
caddr_t client_data,
|
||||
caddr_t call_data )
|
||||
{
|
||||
Arg al[10]; /* arg list */
|
||||
DtEditorWidget pPriv = (DtEditorWidget) client_data;
|
||||
|
||||
/*
|
||||
|
@ -1098,8 +1097,6 @@ _DtEditorMisspelledDblClickCB(
|
|||
caddr_t client_data,
|
||||
caddr_t call_data )
|
||||
{
|
||||
XmListCallbackStruct *cb = (XmListCallbackStruct *)call_data;
|
||||
|
||||
_DtEditorMisspelledSelectCB(w, client_data, call_data );
|
||||
_DtEditorDialogSearchCB(w, client_data, call_data );
|
||||
} /* end _DtEditorMisspelledDblClickCB */
|
||||
|
|
|
@ -575,7 +575,6 @@ Initialize( DtSpinBoxWidget request,
|
|||
{ /* MotifBc */
|
||||
DtSpinBoxPart *spin_p = (DtSpinBoxPart*)
|
||||
&(XmField(new,ipot,DtSpinBox,label,Widget));
|
||||
Widget parent;
|
||||
char *widget_name;
|
||||
Arg args[20];
|
||||
int n;
|
||||
|
@ -1312,7 +1311,6 @@ ForceChildSizes(DtSpinBoxWidget spin)
|
|||
{
|
||||
Dimension available_height, available_width, arrow_width;
|
||||
/* MotifBc & Resolution Independent */
|
||||
Dimension width, height, border_width;
|
||||
Arg args[3];
|
||||
unsigned char unit_type = XmPIXELS;
|
||||
|
||||
|
@ -1818,10 +1816,6 @@ StoreResourceInfo( DtSpinBoxPart *spin_p,
|
|||
Boolean do_items)
|
||||
{
|
||||
XmStringTable table;
|
||||
XmFontList font_list;
|
||||
Dimension width, height;
|
||||
Dimension longest = 0;
|
||||
Dimension highest = 0;
|
||||
int i, base = 1;
|
||||
|
||||
if (do_items && spin_p->items) {
|
||||
|
@ -2327,9 +2321,6 @@ down_cb(Widget w,
|
|||
DtSpinBoxWidget spin = (DtSpinBoxWidget)client_data;
|
||||
DtSpinBoxPart *spin_p = (DtSpinBoxPart*)
|
||||
&(XmField(spin,ipot,DtSpinBox,label,Widget));
|
||||
XmArrowButtonCallbackStruct *arrow_data;
|
||||
XEvent *last_event = NULL;
|
||||
int repeat_delay = RepeatDelay(spin);
|
||||
Boolean crossed_boundary = FALSE;
|
||||
int new_position = Position(spin);
|
||||
float new_current = Current(spin);
|
||||
|
@ -2531,7 +2522,7 @@ DtSpinBoxAddItem( Widget spinw,
|
|||
DtSpinBoxWidget spin = (DtSpinBoxWidget)spinw;
|
||||
DtSpinBoxPart *spin_p;
|
||||
XmString old, new_str, tmp;
|
||||
int total_items, i;
|
||||
int total_items;
|
||||
_DtWidgetToAppContext(spinw);
|
||||
_DtAppLock(app);
|
||||
|
||||
|
|
|
@ -757,12 +757,6 @@ Redisplay(
|
|||
h = M_Height (manager),
|
||||
s_t = M_ShadowThickness (manager);
|
||||
|
||||
GC top_gc = NULL,
|
||||
bottom_gc = NULL,
|
||||
fill_gc = NULL;
|
||||
Boolean s_out = False,
|
||||
s_etched = False;
|
||||
Drawable drawable = XtWindow (manager);
|
||||
Position x = 0,
|
||||
y = title_height / 2 - s_t / 2;
|
||||
|
||||
|
@ -931,18 +925,12 @@ QueryGeometry(
|
|||
XtWidgetGeometry *request,
|
||||
XtWidgetGeometry *reply )
|
||||
{
|
||||
Position x = M_X (manager),
|
||||
y = M_Y (manager);
|
||||
Dimension w = M_Width (manager),
|
||||
h = M_Height (manager),
|
||||
bw = M_BorderWidth (manager),
|
||||
new_w = 0,
|
||||
new_h = 0;
|
||||
Boolean x_req = request->request_mode & CWX,
|
||||
y_req = request->request_mode & CWY,
|
||||
width_req = request->request_mode & CWWidth,
|
||||
height_req = request->request_mode & CWHeight,
|
||||
bw_req = request->request_mode & CWBorderWidth;
|
||||
Boolean width_req = request->request_mode & CWWidth,
|
||||
height_req = request->request_mode & CWHeight;
|
||||
|
||||
/* Compute preferred size if preferred width or height requested.
|
||||
*/
|
||||
|
@ -985,13 +973,11 @@ GeometryManager(
|
|||
XtWidgetGeometry *reply )
|
||||
{
|
||||
DtTitleBoxWidget manager = (DtTitleBoxWidget) XtParent (kid);
|
||||
Widget title_area = M_TitleArea (manager),
|
||||
work_area = M_WorkArea (manager);
|
||||
Widget title_area = M_TitleArea (manager);
|
||||
Dimension ta_w = 0, ta_h = 0, ta_bw = 0,
|
||||
wa_w = 0, wa_h = 0,
|
||||
w = M_Width (manager),
|
||||
h = M_Height (manager),
|
||||
sp = M_TitleSpacing (manager);
|
||||
h = M_Height (manager);
|
||||
Boolean query_only = request->request_mode & XtCWQueryOnly,
|
||||
x_req = request->request_mode & CWX,
|
||||
y_req = request->request_mode & CWY,
|
||||
|
@ -1140,7 +1126,6 @@ InsertChild(
|
|||
DtTitleBoxWidget w;
|
||||
XmManagerWidgetClass mc = (XmManagerWidgetClass)
|
||||
xmManagerWidgetClass;
|
||||
unsigned char child_type;
|
||||
XtWidgetProc insert_child;
|
||||
|
||||
_DtProcessLock();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue