+++ /dev/null
-diff -burN gnokii-0.6.5.orig/common/cfgreader.c gnokii-0.6.5/common/cfgreader.c
---- gnokii-0.6.5.orig/common/cfgreader.c 2005-05-01 22:41:32.576264944 +0200
-+++ gnokii-0.6.5/common/cfgreader.c 2005-05-01 22:44:36.464309712 +0200
-@@ -554,7 +554,7 @@
-
- retval = gn_cfg_read_default();
-
-- (char *)*bindir = gn_cfg_get(gn_cfg_info, "global", "bindir");
-+ *bindir = gn_cfg_get(gn_cfg_info, "global", "bindir");
- if (!*bindir)
- *bindir = gn_cfg_get(gn_cfg_info, "gnokiid", "bindir");
- if (!*bindir)
-diff -burN gnokii-0.6.5.orig/common/links/atbus.c gnokii-0.6.5/common/links/atbus.c
---- gnokii-0.6.5.orig/common/links/atbus.c 2005-05-01 22:41:32.605260536 +0200
-+++ gnokii-0.6.5/common/links/atbus.c 2005-05-01 22:41:57.773434392 +0200
-@@ -262,7 +262,7 @@
- state->link.send_message = &at_send_message;
- businst->rbuf_pos = 1;
- businst->binlen = 1;
-- AT_BUSINST(state) = businst;
-+ (void *)AT_BUSINST(state) = businst;
-
- switch (state->config.connection_type) {
- case GN_CT_Serial:
-@@ -290,7 +290,7 @@
- err:
- dprintf("AT bus initialization failed (%d)\n", error);
- free(AT_BUSINST(state));
-- AT_BUSINST(state) = NULL;
-+ (void *)AT_BUSINST(state) = NULL;
- out:
- return error;
- }
-diff -burN gnokii-0.6.5.orig/common/links/fbus-3110.c gnokii-0.6.5/common/links/fbus-3110.c
---- gnokii-0.6.5.orig/common/links/fbus-3110.c 2005-05-01 22:41:32.604260688 +0200
-+++ gnokii-0.6.5/common/links/fbus-3110.c 2005-05-01 22:41:57.775434088 +0200
-@@ -355,7 +355,7 @@
- state->config.init_length = 100;
-
- /* Start up the link */
-- if ((FBUSINST(state) = calloc(1, sizeof(fb3110_link))) == NULL)
-+ if (((void *)FBUSINST(state) = calloc(1, sizeof(fb3110_link))) == NULL)
- return GN_ERR_MEMORYFULL;
-
- FBUSINST(state)->request_sequence_number = 0x10;
-@@ -368,7 +368,7 @@
-
- if (!fb3110_serial_open(state)) {
- free(FBUSINST(state));
-- FBUSINST(state) = NULL;
-+ (void *)FBUSINST(state) = NULL;
- return GN_ERR_FAILED;
- }
-
-diff -burN gnokii-0.6.5.orig/common/links/fbus-phonet.c gnokii-0.6.5/common/links/fbus-phonet.c
---- gnokii-0.6.5.orig/common/links/fbus-phonet.c 2005-05-01 22:41:32.605260536 +0200
-+++ gnokii-0.6.5/common/links/fbus-phonet.c 2005-05-01 22:41:57.778433632 +0200
-@@ -296,7 +296,7 @@
- state->link.loop = &phonet_loop;
- state->link.send_message = &phonet_send_message;
-
-- if ((FBUSINST(state) = calloc(1, sizeof(phonet_incoming_message))) == NULL)
-+ if (((void *)FBUSINST(state) = calloc(1, sizeof(phonet_incoming_message))) == NULL)
- return GN_ERR_MEMORYFULL;
-
- switch (state->config.connection_type) {
-@@ -312,7 +312,7 @@
- }
- if (error != GN_ERR_NONE) {
- free(FBUSINST(state));
-- FBUSINST(state) = NULL;
-+ (void *)FBUSINST(state) = NULL;
- return error;
- }
-
-diff -burN gnokii-0.6.5.orig/common/links/fbus.c gnokii-0.6.5/common/links/fbus.c
---- gnokii-0.6.5.orig/common/links/fbus.c 2005-05-01 22:41:32.605260536 +0200
-+++ gnokii-0.6.5/common/links/fbus.c 2005-05-01 22:41:57.777433784 +0200
-@@ -628,7 +628,7 @@
- state->config.init_length = 250;
-
- /* Start up the link */
-- if ((FBUSINST(state) = calloc(1, sizeof(fbus_link))) == NULL)
-+ if (((void *)FBUSINST(state) = calloc(1, sizeof(fbus_link))) == NULL)
- return GN_ERR_MEMORYFULL;
-
- FBUSINST(state)->request_sequence_number = 0;
-@@ -677,7 +677,7 @@
- }
- if (!connection) {
- free(FBUSINST(state));
-- FBUSINST(state) = NULL;
-+ (void *)FBUSINST(state) = NULL;
- return GN_ERR_FAILED;
- }
-
-diff -burN gnokii-0.6.5.orig/common/links/gnbus.c gnokii-0.6.5/common/links/gnbus.c
---- gnokii-0.6.5.orig/common/links/gnbus.c 2005-05-01 22:41:32.605260536 +0200
-+++ gnokii-0.6.5/common/links/gnbus.c 2005-05-01 22:41:57.779433480 +0200
-@@ -284,7 +284,7 @@
- state->link.send_message = gnbus_send_message;
-
- /* Start up the link */
-- if ((GNBUSINST(state) = calloc(1, sizeof(gnbus_link))) == NULL)
-+ if (((void *)GNBUSINST(state) = calloc(1, sizeof(gnbus_link))) == NULL)
- return GN_ERR_MEMORYFULL;
-
- GNBUSINST(state)->i.state = GNBUS_RX_Sync;
-@@ -294,7 +294,7 @@
- if (!device_open(state->config.port_device, false, false, false, conn_type, state)) {
- perror(_("Couldn't open GNBUS device"));
- free(GNBUSINST(state));
-- GNBUSINST(state) = NULL;
-+ (void *)GNBUSINST(state) = NULL;
- return GN_ERR_FAILED;
- }
-
-diff -burN gnokii-0.6.5.orig/common/links/m2bus.c gnokii-0.6.5/common/links/m2bus.c
---- gnokii-0.6.5.orig/common/links/m2bus.c 2005-05-01 22:41:32.605260536 +0200
-+++ gnokii-0.6.5/common/links/m2bus.c 2005-05-01 22:41:57.780433328 +0200
-@@ -461,7 +461,7 @@
- state->link.send_message = m2bus_send_message;
-
- /* Start up the link */
-- if ((M2BUSINST(state) = calloc(1, sizeof(m2bus_link))) == NULL)
-+ if (((void *)M2BUSINST(state) = calloc(1, sizeof(m2bus_link))) == NULL)
- return GN_ERR_MEMORYFULL;
-
- M2BUSINST(state)->request_sequence_number = 2;
-@@ -474,7 +474,7 @@
- }
- if (err != GN_ERR_NONE) {
- free(M2BUSINST(state));
-- M2BUSINST(state) = NULL;
-+ (void *)M2BUSINST(state) = NULL;
- return err;
- }
-
-diff -burN gnokii-0.6.5.orig/common/phones/atgen.c gnokii-0.6.5/common/phones/atgen.c
---- gnokii-0.6.5.orig/common/phones/atgen.c 2005-05-01 22:41:32.614259168 +0200
-+++ gnokii-0.6.5/common/phones/atgen.c 2005-05-01 22:41:57.782433024 +0200
-@@ -1683,7 +1683,7 @@
- return GN_ERR_MEMORYFULL;
-
- state->driver.incoming_functions = drvinst->incoming_functions;
-- AT_DRVINST(state) = drvinst;
-+ (void *)AT_DRVINST(state) = drvinst;
- drvinst->manufacturer_error = NULL;
- drvinst->memorytype = GN_MT_XX;
- drvinst->memoryoffset = 0;
-@@ -1758,7 +1758,7 @@
- if (ret) {
- dprintf("Initialization failed (%d)\n", ret);
- free(AT_DRVINST(state));
-- AT_DRVINST(state) = NULL;
-+ (void *)AT_DRVINST(state) = NULL;
- }
- return ret;
- }
-@@ -1767,7 +1767,7 @@
- {
- if (AT_DRVINST(state)) {
- free(AT_DRVINST(state));
-- AT_DRVINST(state) = NULL;
-+ (void *)AT_DRVINST(state) = NULL;
- }
- return pgen_terminate(data, state);
- }
-diff -burN gnokii-0.6.5.orig/common/phones/gnapplet.c gnokii-0.6.5/common/phones/gnapplet.c
---- gnokii-0.6.5.orig/common/phones/gnapplet.c 2005-05-01 22:41:32.613259320 +0200
-+++ gnokii-0.6.5/common/phones/gnapplet.c 2005-05-01 22:41:57.785432568 +0200
-@@ -423,7 +423,7 @@
- if (DRVINSTANCE(state)) return GN_ERR_INTERNALERROR;
- return gnapplet_initialise(state);
- case GN_OP_Terminate:
-- FREE(DRVINSTANCE(state));
-+ FREE((void *)DRVINSTANCE(state));
- return pgen_terminate(data, state);
- case GN_OP_GetImei:
- case GN_OP_GetModel:
-@@ -516,7 +516,7 @@
- /* Copy in the phone info */
- memcpy(&(state->driver), &driver_gnapplet, sizeof(gn_driver));
-
-- if (!(DRVINSTANCE(state) = calloc(1, sizeof(gnapplet_driver_instance))))
-+ if (!((void *)DRVINSTANCE(state) = calloc(1, sizeof(gnapplet_driver_instance))))
- return GN_ERR_MEMORYFULL;
-
- switch (state->config.connection_type) {
-@@ -528,13 +528,13 @@
- err = gnbus_initialise(state);
- break;
- default:
-- FREE(DRVINSTANCE(state));
-+ FREE((void *)DRVINSTANCE(state));
- return GN_ERR_NOTSUPPORTED;
- }
-
- if (err != GN_ERR_NONE) {
- dprintf("Error in link initialisation\n");
-- FREE(DRVINSTANCE(state));
-+ FREE((void *)DRVINSTANCE(state));
- return GN_ERR_NOTSUPPORTED;
- }
-
-@@ -542,7 +542,7 @@
-
- gn_data_clear(&d);
- if ((err = gnapplet_identify(&d, state)) != GN_ERR_NONE) {
-- FREE(DRVINSTANCE(state));
-+ FREE((void *)DRVINSTANCE(state));
- return err;
- }
-
-diff -burN gnokii-0.6.5.orig/common/phones/nk3110.c gnokii-0.6.5/common/phones/nk3110.c
---- gnokii-0.6.5.orig/common/phones/nk3110.c 2005-05-01 22:41:32.612259472 +0200
-+++ gnokii-0.6.5/common/phones/nk3110.c 2005-05-01 22:41:57.786432416 +0200
-@@ -171,7 +171,7 @@
- if (DRVINSTANCE(state)) return GN_ERR_INTERNALERROR;
- return P3110_Initialise(state);
- case GN_OP_Terminate:
-- FREE(DRVINSTANCE(state));
-+ FREE((void *)DRVINSTANCE(state));
- return pgen_terminate(data, state);
- case GN_OP_GetModel:
- case GN_OP_GetRevision:
-@@ -228,7 +228,7 @@
- /* Copy in the phone info */
- memcpy(&(state->driver), &driver_nokia_3110, sizeof(gn_driver));
-
-- if (!(DRVINSTANCE(state) = calloc(1, sizeof(nk3110_driver_instance)))) {
-+ if (!((void *)DRVINSTANCE(state) = calloc(1, sizeof(nk3110_driver_instance)))) {
- error = GN_ERR_MEMORYFULL;
- goto retval;
- }
-@@ -270,7 +270,7 @@
-
- goto retval;
- errcond:
-- FREE(DRVINSTANCE(state));
-+ FREE((void *)DRVINSTANCE(state));
- retval:
- return error;
- }
-diff -burN gnokii-0.6.5.orig/common/phones/nk6100.c gnokii-0.6.5/common/phones/nk6100.c
---- gnokii-0.6.5.orig/common/phones/nk6100.c 2005-05-01 22:41:32.613259320 +0200
-+++ gnokii-0.6.5/common/phones/nk6100.c 2005-05-01 22:41:57.790431808 +0200
-@@ -239,7 +239,7 @@
- if (DRVINSTANCE(state)) return GN_ERR_INTERNALERROR;
- return Initialise(state);
- case GN_OP_Terminate:
-- FREE(DRVINSTANCE(state));
-+ FREE((void *)DRVINSTANCE(state));
- return pgen_terminate(data, state);
- case GN_OP_GetSpeedDial:
- return GetSpeedDial(data, state);
-@@ -523,7 +523,7 @@
- /* Copy in the phone info */
- memcpy(&(state->driver), &driver_nokia_6100, sizeof(gn_driver));
-
-- if (!(DRVINSTANCE(state) = calloc(1, sizeof(nk6100_driver_instance))))
-+ if (!((void *)DRVINSTANCE(state) = calloc(1, sizeof(nk6100_driver_instance))))
- return GN_ERR_MEMORYFULL;
-
- switch (state->config.connection_type) {
-@@ -542,13 +542,13 @@
- err = m2bus_initialise(state);
- break;
- default:
-- FREE(DRVINSTANCE(state));
-+ FREE((void *)DRVINSTANCE(state));
- return GN_ERR_NOTSUPPORTED;
- }
-
- if (err != GN_ERR_NONE) {
- dprintf("Error in link initialisation\n");
-- FREE(DRVINSTANCE(state));
-+ FREE((void *)DRVINSTANCE(state));
- return GN_ERR_NOTSUPPORTED;
- }
-
-@@ -558,7 +558,7 @@
- authorize or set keytable */
-
- if ((err = IdentifyPhone(state)) != GN_ERR_NONE) {
-- FREE(DRVINSTANCE(state));
-+ FREE((void *)DRVINSTANCE(state));
- return err;
- }
-
-@@ -568,7 +568,7 @@
- if (DRVINSTANCE(state)->pm->flags & PM_AUTHENTICATION) {
- /* Now test the link and authenticate ourself */
- if ((err = Authentication(state, DRVINSTANCE(state)->imei)) != GN_ERR_NONE) {
-- FREE(DRVINSTANCE(state));
-+ FREE((void *)DRVINSTANCE(state));
- return err;
- }
- }
-@@ -578,7 +578,7 @@
- /* FIXME: build a default table */
- } else {
- if (BuildKeytable(state) != GN_ERR_NONE) {
-- FREE(DRVINSTANCE(state));
-+ FREE((void *)DRVINSTANCE(state));
- return GN_ERR_NOTSUPPORTED;
- }
- }
-diff -burN gnokii-0.6.5.orig/common/phones/nk6160.c gnokii-0.6.5/common/phones/nk6160.c
---- gnokii-0.6.5.orig/common/phones/nk6160.c 2005-05-01 22:41:32.613259320 +0200
-+++ gnokii-0.6.5/common/phones/nk6160.c 2005-05-01 22:41:57.791431656 +0200
-@@ -189,7 +189,7 @@
- if (error) {
- dprintf("Initialization failed (%d)\n", error);
- free(NK6160_DRVINST(state));
-- NK6160_DRVINST(state) = NULL;
-+ (void *)NK6160_DRVINST(state) = NULL;
- }
- return error;
- }
-diff -burN gnokii-0.6.5.orig/common/phones/nk7110.c gnokii-0.6.5/common/phones/nk7110.c
---- gnokii-0.6.5.orig/common/phones/nk7110.c 2005-05-01 22:41:32.614259168 +0200
-+++ gnokii-0.6.5/common/phones/nk7110.c 2005-05-01 22:41:57.793431352 +0200
-@@ -199,7 +199,7 @@
- case GN_OP_Init:
- return NK7110_Initialise(state);
- case GN_OP_Terminate:
-- FREE(DRVINSTANCE(state));
-+ FREE((void *)DRVINSTANCE(state));
- return pgen_terminate(data, state);
- case GN_OP_GetModel:
- return NK7110_GetModel(data, state);
-@@ -343,7 +343,7 @@
- /* Copy in the phone info */
- memcpy(&(state->driver), &driver_nokia_7110, sizeof(gn_driver));
-
-- if (!(DRVINSTANCE(state) = calloc(1, sizeof(nk7110_driver_instance))))
-+ if (!((void *)DRVINSTANCE(state) = calloc(1, sizeof(nk7110_driver_instance))))
- return GN_ERR_INTERNALERROR;
-
- dprintf("Connecting\n");
-@@ -371,7 +371,7 @@
- err = m2bus_initialise(state);
- break;
- default:
-- FREE(DRVINSTANCE(state));
-+ FREE((void *)DRVINSTANCE(state));
- return GN_ERR_NOTSUPPORTED;
- }
-
-@@ -389,7 +389,7 @@
- connected = true;
- }
- if (!connected) {
-- FREE(DRVINSTANCE(state));
-+ FREE((void *)DRVINSTANCE(state));
- return err;
- }
-