static int ocd_read_bytes PARAMS ((CORE_ADDR memaddr,
char *myaddr, int len));
-static int ocd_start_remote PARAMS ((char *dummy));
+static int ocd_start_remote PARAMS ((PTR dummy));
static int readchar PARAMS ((int timeout));
static int
ocd_start_remote (dummy)
- char *dummy;
+ PTR dummy;
{
unsigned char buf[10], *p;
int pktlen;
int speed;
enum ocd_target_type target_type;
- target_type = (enum ocd_target_type)dummy;
+ target_type = *(enum ocd_target_type*)dummy;
immediate_quit = 1; /* Allow user to interrupt it */
/* Start the remote connection; if error (0), discard this target.
In particular, if the user quits, be sure to discard it
(we'd be in an inconsistent state otherwise). */
- if (!catch_errors (ocd_start_remote, (char *)target_type,
+ if (!catch_errors (ocd_start_remote, &target_type,
"Couldn't establish connection to remote target\n",
RETURN_MASK_ALL))
{