summaryrefslogtreecommitdiff
path: root/Build/source/texk/xdvik
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2013-06-27 12:13:25 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2013-06-27 12:13:25 +0000
commitd461a65ed824ec63c77f4ef241065619f3e8804b (patch)
tree61eaab0c21753ae8cdb38c87c9e62dbca3930c13 /Build/source/texk/xdvik
parentd97e8d7e3159ea8dc7c20459710b9cd1cb6f53ac (diff)
compiler warnings: Drop 'set but not used' variables
git-svn-id: svn://tug.org/texlive/trunk@30976 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/xdvik')
-rw-r--r--Build/source/texk/xdvik/ChangeLog11
-rw-r--r--Build/source/texk/xdvik/dvi-draw.c2
-rw-r--r--Build/source/texk/xdvik/events.c7
-rw-r--r--Build/source/texk/xdvik/gui/print-dialog.c32
-rw-r--r--Build/source/texk/xdvik/gui/print-log.c12
-rw-r--r--Build/source/texk/xdvik/gui/search-dialog.c3
-rw-r--r--Build/source/texk/xdvik/gui/xicon.c3
-rw-r--r--Build/source/texk/xdvik/hypertex.c3
-rw-r--r--Build/source/texk/xdvik/special.c13
-rw-r--r--Build/source/texk/xdvik/xdvi.c2
10 files changed, 45 insertions, 43 deletions
diff --git a/Build/source/texk/xdvik/ChangeLog b/Build/source/texk/xdvik/ChangeLog
index 40e0320134b..f8bfeca3609 100644
--- a/Build/source/texk/xdvik/ChangeLog
+++ b/Build/source/texk/xdvik/ChangeLog
@@ -1,3 +1,14 @@
+2013-06-27 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ Drop variables that are set but not used:
+ * dvi-draw.c: 'actual_w'.
+ * events.c: 'arg_bak' and 'clear_statusline'.
+ * gui/print-dialog.c: 'dest_label' and 'range_label'.
+ * gui/search-dialog.c: 'timeout'.
+ * hypertex.c: 'x_delta'.
+ * special.c: 'found' (two times).
+ * xdvi.c: 'exclusive'.
+
2013-06-20 Peter Breitenlohner <peb@mppmu.mpg.de>
* m4/xdvi-check-iconv.m4: Somewhat improved logic.
diff --git a/Build/source/texk/xdvik/dvi-draw.c b/Build/source/texk/xdvik/dvi-draw.c
index faed476097a..342bf8edc51 100644
--- a/Build/source/texk/xdvik/dvi-draw.c
+++ b/Build/source/texk/xdvik/dvi-draw.c
@@ -855,7 +855,6 @@ shrink_glyph_grey(struct glyph *g)
bmUnitT *unshrunk_ptr;
unsigned int size;
int row_num;
- int actual_w;
#if COLOR
if (fg_active != fg_current) {
@@ -985,7 +984,6 @@ shrink_glyph_grey(struct glyph *g)
#endif
unshrunk_ptr = (bmUnitT *)g->bitmap.bits;
- actual_w = g->bitmap.w;
rows_left = g->bitmap.h;
y = 0;
/* the basic algorithm is the same as in the nogrey code, with the main
diff --git a/Build/source/texk/xdvik/events.c b/Build/source/texk/xdvik/events.c
index db582cd9a6c..4a78194f6c2 100644
--- a/Build/source/texk/xdvik/events.c
+++ b/Build/source/texk/xdvik/events.c
@@ -2563,8 +2563,7 @@ void
Act_shrink_to_dpi(Widget w, XEvent *event,
String *params, Cardinal *num_params)
{
- int arg, arg_bak;
- Boolean clear_statusline = False;
+ int arg;
UNUSED(w);
UNUSED(event);
@@ -2573,10 +2572,6 @@ Act_shrink_to_dpi(Widget w, XEvent *event,
if (!get_int_arg(params, num_params, &arg))
arg = 0;
- else
- clear_statusline = True;
-
- arg_bak = arg;
if (arg > 0)
arg = (double)resource.pixels_per_inch / arg + 0.5;
diff --git a/Build/source/texk/xdvik/gui/print-dialog.c b/Build/source/texk/xdvik/gui/print-dialog.c
index 4724513f0ca..79c2b34c887 100644
--- a/Build/source/texk/xdvik/gui/print-dialog.c
+++ b/Build/source/texk/xdvik/gui/print-dialog.c
@@ -1182,10 +1182,8 @@ xaw_create_dialog(struct save_or_print_info *info)
Widget form, paned, box;
Widget dummy_label_form, dummy_pages_form; /* dummy forms to get indentation consistent */
Widget save_to_file_form;
- Widget dest_label;
Widget print_to_printer_form, print_to_file_form, dvips_options_form;
Widget dvips_options_label;
- Widget range_label;
Widget page_range_form;
Widget range_marked_form;
Widget range_from_to_form;
@@ -1259,11 +1257,11 @@ xaw_create_dialog(struct save_or_print_info *info)
XtNborderWidth, 0,
HORIZONTAL_RESIZING_YES,
NULL);
- dest_label = XtVaCreateManagedWidget("print_to", labelWidgetClass, dummy_label_form,
- XtNlabel, "Print to: ",
- XtNborderWidth, 0,
- HORIZONTAL_RESIZING_NO,
- NULL);
+ XtVaCreateManagedWidget("print_to", labelWidgetClass, dummy_label_form,
+ XtNlabel, "Print to: ",
+ XtNborderWidth, 0,
+ HORIZONTAL_RESIZING_NO,
+ NULL);
print_to_printer_form = XtVaCreateManagedWidget("print_to_printer_form", formWidgetClass, form,
XtNresizable, True,
@@ -1365,11 +1363,11 @@ xaw_create_dialog(struct save_or_print_info *info)
XtNborderWidth, 0,
HORIZONTAL_RESIZING_YES,
NULL);
- dest_label = XtVaCreateManagedWidget("save_as", labelWidgetClass, dummy_label_form,
- XtNlabel, "Save as: ",
- XtNborderWidth, 0,
- HORIZONTAL_RESIZING_NO,
- NULL);
+ XtVaCreateManagedWidget("save_as", labelWidgetClass, dummy_label_form,
+ XtNlabel, "Save as: ",
+ XtNborderWidth, 0,
+ HORIZONTAL_RESIZING_NO,
+ NULL);
save_to_file_form = XtVaCreateManagedWidget("save_to_file_form", formWidgetClass, form,
XtNborderWidth, 0,
XtNfromVert, dummy_label_form,
@@ -1552,11 +1550,11 @@ xaw_create_dialog(struct save_or_print_info *info)
HORIZONTAL_RESIZING_NO,
NULL);
- range_label = XtVaCreateManagedWidget("range_lab", labelWidgetClass, dummy_pages_form,
- XtNlabel, "Pages:",
- XtNborderWidth, 0,
- HORIZONTAL_RESIZING_NO,
- NULL);
+ XtVaCreateManagedWidget("range_lab", labelWidgetClass, dummy_pages_form,
+ XtNlabel, "Pages:",
+ XtNborderWidth, 0,
+ HORIZONTAL_RESIZING_NO,
+ NULL);
page_range_form = XtVaCreateManagedWidget(Xdvi_PAGE_RANGE_FORM_NAME, formWidgetClass, form,
XtNborderWidth, 0,
diff --git a/Build/source/texk/xdvik/gui/print-log.c b/Build/source/texk/xdvik/gui/print-log.c
index 62e729fbe19..264a3eacf47 100644
--- a/Build/source/texk/xdvik/gui/print-log.c
+++ b/Build/source/texk/xdvik/gui/print-log.c
@@ -716,7 +716,6 @@ static void
printlog_act_cancel_or_destroy(Widget w, XEvent *event, String *params, Cardinal *num_params)
{
void *ptr;
- struct save_or_print_info *info;
UNUSED(w);
UNUSED(event);
@@ -726,10 +725,15 @@ printlog_act_cancel_or_destroy(Widget w, XEvent *event, String *params, Cardinal
return;
}
sscanf(*params, "%p", &ptr);
- info = (struct save_or_print_info *)ptr;
cb_printlog_act_cancel_or_destroy(w, (XtPointer)ptr, NULL);
- /* ASSERT(info->callbacks != NULL && info->callbacks->cb_cancel != NULL, "Callback not initialized"); */
- /* info->callbacks->cb_cancel(w, info, NULL); */
+#if 0
+ {
+ struct save_or_print_info *info = (struct save_or_print_info *)ptr;
+
+ ASSERT(info->callbacks != NULL && info->callbacks->cb_cancel != NULL, "Callback not initialized");
+ info->callbacks->cb_cancel(w, info, NULL);
+ }
+#endif
}
diff --git a/Build/source/texk/xdvik/gui/search-dialog.c b/Build/source/texk/xdvik/gui/search-dialog.c
index 895db86480c..5e1a69792a0 100644
--- a/Build/source/texk/xdvik/gui/search-dialog.c
+++ b/Build/source/texk/xdvik/gui/search-dialog.c
@@ -659,7 +659,6 @@ xaw_search_go(Widget w, XEvent *event, String *params, Cardinal *num_params)
void *ptr;
char *searchterm = NULL;
Widget button, input;
- XtIntervalId timeout;
UNUSED(w);
@@ -696,7 +695,7 @@ xaw_search_go(Widget w, XEvent *event, String *params, Cardinal *num_params)
XtCallActionProc(button, "set", event, NULL, 0);
XtCallActionProc(button, "notify", event, NULL, 0);
XSync(DISP, False);
- timeout = XtAppAddTimeOut(globals.app, 150, xaw_unset_button, (XtPointer)button);
+ XtAppAddTimeOut(globals.app, 150, xaw_unset_button, (XtPointer)button);
}
diff --git a/Build/source/texk/xdvik/gui/xicon.c b/Build/source/texk/xdvik/gui/xicon.c
index 15faa32442a..d0221997b36 100644
--- a/Build/source/texk/xdvik/gui/xicon.c
+++ b/Build/source/texk/xdvik/gui/xicon.c
@@ -107,7 +107,6 @@ add_icon(Widget top_level,
XIconSize *size;
int number_sizes;
Display *dsp;
- Screen *scr;
XpmAttributes attr;
UNUSED(xdvi_bits);
@@ -127,7 +126,7 @@ add_icon(Widget top_level,
}
dsp = XtDisplay(top_level);
- scr = XtScreen(top_level);
+ XtScreen(top_level);
attr.valuemask = 0L;
attr.valuemask = XpmCloseness | XpmReturnPixels | XpmColormap | XpmDepth | XpmVisual;
diff --git a/Build/source/texk/xdvik/hypertex.c b/Build/source/texk/xdvik/hypertex.c
index ed2f4696cdc..3684a25b698 100644
--- a/Build/source/texk/xdvik/hypertex.c
+++ b/Build/source/texk/xdvik/hypertex.c
@@ -1313,7 +1313,7 @@ void
htex_record_position(int ulx, int uly, int w, int h)
{
int lrx, lry;
- int y_delta, x_delta;
+ int y_delta;
if (!INSIDE_MANE_WIN) /* this would give wrong values */
return;
@@ -1322,7 +1322,6 @@ htex_record_position(int ulx, int uly, int w, int h)
lry = uly + h;
y_delta = lry - uly;
- x_delta = lrx - ulx;
/* heuristics for creating new bounding box at what might be linebreaks */
if (lrx < x_pos_bak /* ordinary linebreak */
diff --git a/Build/source/texk/xdvik/special.c b/Build/source/texk/xdvik/special.c
index 6c769dc0421..9d8cf893fdd 100644
--- a/Build/source/texk/xdvik/special.c
+++ b/Build/source/texk/xdvik/special.c
@@ -2594,7 +2594,6 @@ scan_special(char *cp, int cp_len, void *data)
}
if (memicmp(cp, "ps:", 3) == 0) {
- Boolean found;
cp += 3;
/* check for hdvips hyperlinks */
if (memicmp(cp, "sdict begin ", strlen("sdict begin ")) == 0) {
@@ -2618,19 +2617,21 @@ scan_special(char *cp, int cp_len, void *data)
|| (match = strstr(cp, "/Link")) != NULL
|| (match = strstr(cp, "/View")) != NULL) {
if (match != NULL)
- found = htex_prescan_special(match, cp_len, data);
+ htex_prescan_special(match, cp_len, data);
else
- found = htex_prescan_special(cp, cp_len, data);
+ htex_prescan_special(cp, cp_len, data);
}
}
}
else if (memicmp(cp, "html:", strlen("html:")) == 0) {
- Boolean found;
size_t offset = strlen("html:");
- found = htex_prescan_special(cp + offset, cp_len - offset, data);
- /* if searching for a specific string, return as soon as it's found - not yet implemented */
#if 0
+ Boolean found =
+#endif
+ htex_prescan_special(cp + offset, cp_len - offset, data);
+#if 0
+ /* if searching for a specific string, return as soon as it's found - not yet implemented */
if (my_data != NULL && my_data->scan_type == HTEX_ANCHOR_STRING && found) {
return True;
}
diff --git a/Build/source/texk/xdvik/xdvi.c b/Build/source/texk/xdvik/xdvi.c
index b5153c64695..7aa938e4160 100644
--- a/Build/source/texk/xdvik/xdvi.c
+++ b/Build/source/texk/xdvik/xdvi.c
@@ -1889,7 +1889,6 @@ compile_modifiers(const char **pp, struct mouse_acts *mactp)
{
const char *p = *pp;
const char *p1;
- Boolean exclusive = False;
LateBindingsPtr latep = NULL;
int nlate;
@@ -1919,7 +1918,6 @@ compile_modifiers(const char **pp, struct mouse_acts *mactp)
}
else {
if (*p == '!') {
- exclusive = True;
do {
++p;
} while (*p == ' ' || *p == '\t');