summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Chan <benchan@chromium.org>2012-09-12 15:50:18 -0700
committerAleksander Morgado <aleksander@lanedo.com>2012-09-13 07:23:59 +0200
commitcd7b841f2b71609ac54204dc503c7bfb1029a4f8 (patch)
treed44d2bdfbc6caad3390cec7220746131b6ec39ef
parentc799a08dd873357b3d3dc00f1523af3119f9b18d (diff)
device: rename variable 'link' to 'link_protocol'
This patch renames variable 'link' to 'link_protocol' in order to avoid collision with the 'link' symbol exported by unistd.h, which causes the following compilation error: qmi-device.c: In function 'process_open_flags': qmi-device.c:1513:32: error: declaration of 'link' shadows a global declaration [-Werror=shadow]
-rw-r--r--libqmi-glib/qmi-device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libqmi-glib/qmi-device.c b/libqmi-glib/qmi-device.c
index 794838f..46dcdec 100644
--- a/libqmi-glib/qmi-device.c
+++ b/libqmi-glib/qmi-device.c
@@ -1510,7 +1510,7 @@ process_open_flags (DeviceOpenContext *ctx)
if (ctx->flags & NETPORT_FLAGS) {
QmiMessageCtlSetDataFormatInput *input;
QmiCtlDataFormat qos = QMI_CTL_DATA_FORMAT_QOS_FLOW_HEADER_ABSENT;
- QmiCtlDataLinkProtocol link = QMI_CTL_DATA_LINK_PROTOCOL_802_3;
+ QmiCtlDataLinkProtocol link_protocol = QMI_CTL_DATA_LINK_PROTOCOL_802_3;
g_debug ("[%s] Setting network port data format...",
ctx->self->priv->path_display);
@@ -1522,8 +1522,8 @@ process_open_flags (DeviceOpenContext *ctx)
qmi_message_ctl_set_data_format_input_set_format (input, qos, NULL);
if (ctx->flags & QMI_DEVICE_OPEN_FLAGS_NET_RAW_IP)
- link = QMI_CTL_DATA_LINK_PROTOCOL_RAW_IP;
- qmi_message_ctl_set_data_format_input_set_protocol (input, link, NULL);
+ link_protocol = QMI_CTL_DATA_LINK_PROTOCOL_RAW_IP;
+ qmi_message_ctl_set_data_format_input_set_protocol (input, link_protocol, NULL);
ctx->flags &= ~NETPORT_FLAGS;
qmi_client_ctl_set_data_format (ctx->self->priv->client_ctl,