[PATCH] device: rename variable 'link' to 'link_protocol'
Aleksander Morgado
aleksander at lanedo.com
Wed Sep 12 22:11:55 PDT 2012
On 09/13/2012 12:50 AM, Ben Chan wrote:
> 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]
Pushed, thanks.
> ---
> libqmi-glib/qmi-device.c | 6 +++---
> 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,
>
--
Aleksander
More information about the libqmi-devel
mailing list