File magicpoint-1.13a-compile-warning.diff of Package mgp
---
draw.c | 17 +++++++++--------
mgp.c | 2 ++
mng.c | 2 +-
parse.c | 2 +-
x11.c | 8 +++-----
5 files changed, 16 insertions(+), 15 deletions(-)
--- a/draw.c
+++ b/draw.c
@@ -1127,7 +1127,7 @@ cutin(state, lx, ly, dir)
u_int step, x, xoff, yoff;
int i, sx, round;
int root_x, root_y, use_copy;
- Window cutinWin, junkwin;
+ Window cutinWin = 0, junkwin;
XImage *copywin;
static XWindowAttributes xa;
XWindowAttributes wa;
@@ -2884,7 +2884,7 @@ draw_onechar_x(state, code, x, y, size,
fprintf(stderr, "X11 font %s:%d:%s has bogus "
"font metric for glyph 0x%04x\n"
"\tcs->width=%d, source=%s, coffset=0x%04x\n",
- seed, char_size, registry?registry:"NULL",
+ seed, char_size[caching], registry?registry:"NULL",
code, cs->width, metricsource, coffset);
}
cs = &xfontstruct->max_bounds;
@@ -2935,7 +2935,6 @@ back_gradation(state, cg0)
int hquality, vquality;
Image *myimage, *image;
- Pixmap mypixmap;
XImageInfo *ximageinfo;
byte *pic;
int private = mgp_flag & FL_PRIVATE;
@@ -3059,7 +3058,7 @@ back_gradation(state, cg0)
xzoomrate, yzoomrate);
fprintf(stderr, "background zoom mode %d: "
"(%d, %d)->(%d, %d)[%d]\n", cg->ct_zoomflag,
- srcwidth, srcheight, dstwidth, dstheight, b_quality);
+ srcwidth, srcheight, dstwidth, dstheight, b_quality[caching]);
}
if (xzoomrate != 100.0 || yzoomrate != 100.0) {
@@ -3312,7 +3311,7 @@ image_load(state, filename, numcolor, xi
image = myimage;
myimage = zoom(image, xzoomrate, yzoomrate, verbose);
if (!image) {
- fprintf(stderr, "image zoom (%dx%d) failed in image_load\n",
+ fprintf(stderr, "image zoom (%gx%g) failed in image_load\n",
xzoomrate, yzoomrate);
exit(1);
}
@@ -4327,7 +4326,6 @@ epstoimage(state, epsfile, x, y, width,
char *cp;
int scale = 1;
struct stat stbuf;
- XColor back;
char geom[32], device[64], scalebuf[32];
static char imagefile[MAXPATHLEN];
void (*sigpipe_handler)();
@@ -5077,7 +5075,7 @@ XClearPixmap(display, target)
Drawable target;
{
int i;
- int x, y, width, height;
+ int x, y;
XImage *xim;
switch(bg_ctl->ct_op){
@@ -5154,6 +5152,9 @@ obj_new_anim(state, x, y, width, height,
return 1;
}
+extern void mngload(char *mngfile, int x, int y, int width, int height);
+extern void mngpreload(struct render_state *state, char *mngfile, int *width, int *height);
+
static void
obj_draw_anim(state, x, y, obj)
struct render_state *state;
@@ -5268,7 +5269,7 @@ xft_draw_fragment(state, p, len, registr
if (!strncmp(registry, rtab[i], 3)) break;
}
if (i == 3) return NULL; /* cannot find codeset */
- sprintf(buf16, "%s%s\0", prefix[i], p);
+ sprintf(buf16, "%s%s", prefix[i], p);
if (icv[i] == (iconv_t)0) icv[i] = iconv_open("UTF-8", etab[i]);
if (icv[i] == (iconv_t)-1) {
fprintf(stderr, "your iconv doesn't support %s\n",
--- a/mgp.c
+++ b/mgp.c
@@ -764,6 +764,8 @@ beep()
XBell(display, 0);
}
+extern void reset_background_pixmap(void);
+
static void
main_loop(start_page)
u_int start_page;
--- a/mng.c
+++ b/mng.c
@@ -249,7 +249,7 @@ void mymngquit()
exit(0);
}
-int checkevents(mng_handle mng)
+void checkevents(mng_handle mng)
{
/* not implemented yet */
}
--- a/parse.c
+++ b/parse.c
@@ -1254,7 +1254,7 @@ thirdpass()
*/
{
int textseen;
- int contseen;
+ int contseen = 0;
for (page = 1; page <= maxpage; page++) {
line = page_attribute[page].pg_linenum;
for (l = 0; l <= line; l++) {
--- a/x11.c
+++ b/x11.c
@@ -218,7 +218,6 @@ init_win2()
struct gcconf *pc;
u_long color;
XClassHint res = { "MagicPoint", "MagicPoint" };
- int i;
xsa.border_pixel = fore_color[0];
xsa.background_pixel = back_color[0];
@@ -355,10 +354,11 @@ init_win3()
void
toggle_fullscreen()
{
- static fullscreen = 0;
+ static int fullscreen = 0;
XClientMessageEvent xev;
- fullscreen = ++fullscreen % 2;
+ ++fullscreen;
+ fullscreen %= 2;
memset(&xev, 0, sizeof(xev));
xev.type=ClientMessage;
xev.message_type=XInternAtom(display, "_NET_WM_STATE", False);
@@ -457,8 +457,6 @@ int num;
void
reset_cache_pixmap()
{
- int i;
-
XFreePixmap(display, cachewin);
XFreePixmap(display, cachetmp);
cachewin = XCreatePixmap(display, window, xa.width, xa.height, depth);