Commit 99a557d6 authored by runge's avatar runge

x11vnc: clean up compiler warnings.

parent 56eb45a5
......@@ -4,6 +4,7 @@
#include "scan.h"
#include "util.h"
#include "win_utils.h"
#include "xwrappers.h"
int multivis_count = 0;
int multivis_24count = 0;
......
x11vnc README file Date: Thu Dec 28 00:14:27 EST 2006
x11vnc README file Date: Thu Dec 28 10:42:34 EST 2006
The following information is taken from these URLs:
......
......@@ -17,6 +17,7 @@
#include "xwrappers.h"
#include "xevents.h"
#include "macosxCG.h"
#include "userinput.h"
/*
* routines for handling incoming, outgoing, etc connections
......
......@@ -1227,6 +1227,8 @@ unsigned long get_cursor_serial(int mode) {
return last_cursor;
} else if (mode == 1) {
return (unsigned long) last_index;
} else {
return (unsigned long) last_index;
}
}
......@@ -1320,7 +1322,7 @@ fprintf(stderr, "sc: %d %d/%d %d - %d %d\n", serial, w, h, cbpp, xhot, yhot);
oldest = i;
oldtime = curs_times[i];
}
if (serial == curs_index[i]) {
if (serial == (int) curs_index[i]) {
/*
* got a hit with an existing cursor,
* use that one.
......
......@@ -267,7 +267,9 @@ if (0) fprintf(stderr, "run_gui: %s -- %d %d\n", gui_xdisplay, connect_to_x11vnc
initialize_x11vnc_remote_prop();
}
#ifdef MACOSX
macjump:
#endif
signal(SIGUSR1, sigusr1);
got_sigusr1 = 0;
......@@ -630,7 +632,9 @@ void do_gui(char *opts, int sleep) {
}
XCloseDisplay_wr(test_dpy);
#ifdef MACOSX
startit:
#endif
if (start_x11vnc) {
......
......@@ -14,6 +14,7 @@
#include "v4l.h"
#include "linuxfb.h"
#include "uinput.h"
#include "macosx.h"
void get_keystate(int *keystate);
void clear_modifiers(int init);
......
......@@ -48,12 +48,15 @@ void macosx_event_loop(void) {
return;
}
char *macosx_console_guess(char *str, int *fd) {
if (!str || !fd) {}
return NULL;
}
void macosx_key_command(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
if (!down || !keysym || !client) {}
return;
}
void macosx_pointer_command(int mask, int x, int y, rfbClientPtr client) {
if (!mask || !x || !y || !client) {}
return;
}
char *macosx_get_fb_addr(void) {
......@@ -63,35 +66,45 @@ int macosx_get_cursor(void) {
return 0;
}
int macosx_get_cursor_pos(int *x, int *y) {
if (!x || !y) {}
return 0;
}
void macosx_send_sel(char * str, int len) {
if (!str || !len) {}
return;
}
void macosx_set_sel(char * str, int len) {
if (!str || !len) {}
return;
}
int macosx_valid_window(Window w, XWindowAttributes* a) {
if (!w || !a) {}
return 0;
}
Status macosx_xquerytree(Window w, Window *root_return, Window *parent_return,
Window **children_return, unsigned int *nchildren_return) {
if (!w || !root_return || !parent_return || !children_return || !nchildren_return) {}
return (Status) 0;
}
void macosx_add_mapnotify(Window win, int level, int map) {
if (!win || !level || !map) {}
return;
}
void macosx_add_create(Window win, int level) {
if (!win || !level) {}
return;
}
void macosx_add_destroy(Window win, int level) {
if (!win || !level) {}
return;
}
void macosx_add_visnotify(Window win, int level, int obscured) {
if (!win || !level || !obscured) {}
return;
}
int macosx_checkevent(XEvent *ev) {
if (!ev) {}
return 0;
}
......
......@@ -6,6 +6,8 @@
* will not work!!
*/
void macosxCG_dummy(void) {}
#if (defined(__MACH__) && defined(__APPLE__))
#include <ApplicationServices/ApplicationServices.h>
......
......@@ -15,6 +15,7 @@
#include "linuxfb.h"
#include "uinput.h"
#include "scan.h"
#include "macosx.h"
int pointer_queued_sent = 0;
......
......@@ -13,6 +13,7 @@
#include "unixpw.h"
#include "screen.h"
#include "macosx.h"
#include "userinput.h"
/*
* routines for scanning and reading the X11 display for changes, and
......@@ -2351,7 +2352,6 @@ static void blackout_regions(void) {
* are other issues... use -fs 1.0 to disable.
*/
int copy_screen(void) {
int pixelsize = bpp/8;
char *fbp;
int i, y, block_size;
......@@ -2462,7 +2462,7 @@ static void snap_all_rawfb(void) {
}
int copy_snap(void) {
int db = 1, pixelsize = bpp/8;
int db = 1;
char *fbp;
int i, y, block_size;
double dt;
......@@ -2872,7 +2872,9 @@ if (ncache > 0) {
}
} else {
#if !NO_X11
if (XCheckTypedEvent(dpy, MapNotify, &ev)) {
if (raw_fb_str) {
;
} else if (XCheckTypedEvent(dpy, MapNotify, &ev)) {
gotone = 1;
} else if (XCheckTypedEvent(dpy, UnmapNotify, &ev)) {
gotone = 2;
......@@ -2995,7 +2997,7 @@ int scan_for_updates(int count_only) {
double frac2 = 0.35; /* or 3rd */
double frac3 = 0.02; /* do scan_display() again after copy_tiles() */
static double last_poll = 0.0;
double dtmp;
double dtmp = 0.0;
if (unixpw_in_progress) return 0;
......@@ -3190,9 +3192,14 @@ int scan_for_updates(int count_only) {
}
if (unixpw_in_progress) return 0;
/* XXX Y */
if (0 && tile_count > 20) print_tiles();
//dtmp = dnow();
#if 0
dtmp = dnow();
#else
dtmp = 0.0;
#endif
if (old_copy_tile) {
tile_diffs = copy_all_tiles();
......@@ -3200,7 +3207,10 @@ if (0 && tile_count > 20) print_tiles();
tile_diffs = copy_all_tile_runs();
}
SCAN_FATAL(tile_diffs);
//if (tile_count) fprintf(stderr, "XX copytile: %.4f tile_count: %d\n", dnow() - dtmp, tile_count);
#if 0
if (tile_count) fprintf(stderr, "XX copytile: %.4f tile_count: %d\n", dnow() - dtmp, tile_count);
#endif
/*
* This backward pass for upward and left tiles complements what
......
......@@ -701,7 +701,6 @@ void free_old_fb(void) {
void do_new_fb(int reset_mem) {
XImage *fb;
int i;
/* for threaded we really should lock libvncserver out. */
if (use_threads) {
......
......@@ -4,6 +4,7 @@
#include "win_utils.h"
#include "xwrappers.h"
#include "connections.h"
#include "cleanup.h"
char *guess_desktop(void);
void solid_bg(int restore);
......
......@@ -980,7 +980,7 @@ void check_new_passwds(int force) {
}
rfbBool custom_passwd_check(rfbClientPtr cl, const char *response, int len) {
char *input, *q, *cmd;
char *input, *cmd;
char num[16];
int j, i, n, rc;
......
This diff is collapsed.
......@@ -37,4 +37,7 @@ extern int fb_update_sent(int *count);
extern int check_user_input(double dt, double dtr, int tile_diffs, int *cnt);
extern void do_copyregion(sraRegionPtr region, int dx, int dy, int mode);
extern int check_ncache(int reset, int mode);
extern int find_rect(int idx, int x, int y, int w, int h);
#endif /* _X11VNC_USERINPUT_H */
......@@ -290,7 +290,7 @@ void update_stack_list(void) {
X_LOCK;
for (k=0; k < stack_list_num; k++) {
Window win = stack_list[k].win;
if (win != None && boff <= win && win < boff + bwin) {
if (win != None && boff <= (int) win && (int) win < boff + bwin) {
; /* special, blackout */
} else if (!valid_window(win, &attr, 1)) {
stack_list[k].valid = 0;
......
......@@ -79,6 +79,10 @@ Bool XQueryPointer_wr(Display *display, Window w, Window *root_return,
Window *child_return, int *root_x_return, int *root_y_return,
int *win_x_return, int *win_y_return, unsigned int *mask_return);
Status XQueryTree_wr(Display *display, Window w, Window *root_return,
Window *parent_return, Window **children_return,
unsigned int *nchildren_return);
int XFree_wr(void *data);
int XSelectInput_wr(Display *display, Window w, long event_mask);
......
......@@ -76,6 +76,10 @@ extern Bool XQueryPointer_wr(Display *display, Window w, Window *root_return,
Window *child_return, int *root_x_return, int *root_y_return,
int *win_x_return, int *win_y_return, unsigned int *mask_return);
extern Status XQueryTree_wr(Display *display, Window w, Window *root_return,
Window *parent_return, Window **children_return,
unsigned int *nchildren_return);
extern int XFree_wr(void *data);
extern int XSelectInput_wr(Display *display, Window w, long event_mask);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment