<div dir="ltr">Yeah, let me revise the patch.<div><br></div><div>- Ben</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 10, 2013 at 12:11 AM, Aleksander Morgado <span dir="ltr"><<a href="mailto:aleksander@lanedo.com" target="_blank">aleksander@lanedo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 10/05/13 08:57, Ben Chan wrote:<br>
> This patch fixes the following type mismatches in the format string for<br>
> printing cell IDs:<br>
><br>
> qmicli-nas.c:1271:71: error: format specifies type 'unsigned short' but the argument has type 'guint32' (aka 'unsigned int') [-Werror,-Wformat]<br>
> g_print ("\t\tCell ID: '%" G_GUINT16_FORMAT"'\n", cid);<br>
> ~~~ ^~~<br>
> qmicli-nas.c:1391:71: error: format specifies type 'unsigned short' but the argument has type 'guint32' (aka 'unsigned int') [-Werror,-Wformat]<br>
> g_print ("\t\tCell ID: '%" G_GUINT16_FORMAT"'\n", cid);<br>
> ~~~ ^~~<br>
> qmicli-nas.c:1505:71: error: format specifies type 'unsigned short' but the argument has type 'guint32' (aka 'unsigned int') [-Werror,-Wformat]<br>
> g_print ("\t\tCell ID: '%" G_GUINT16_FORMAT"'\n", cid);<br>
> ~~~ ^~~<br>
> qmicli-nas.c:1626:71: error: format specifies type 'unsigned short' but the argument has type 'guint32' (aka 'unsigned int') [-Werror,-Wformat]<br>
> g_print ("\t\tCell ID: '%" G_GUINT16_FORMAT"'\n", cid);<br>
> ~~~ ^~~<br>
><br>
> Bug reported on <a href="https://code.google.com/p/chromium/issues/detail?id=239736" target="_blank">https://code.google.com/p/chromium/issues/detail?id=239736</a><br>
<br>
<br>
</div>Bah, just use %u for printing the guint32. Should probably also just use<br>
%hu instead of G_GUINT16_FORMAT, but anyway...<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
> ---<br>
> cli/qmicli-nas.c | 8 ++++----<br>
> 1 file changed, 4 insertions(+), 4 deletions(-)<br>
><br>
> diff --git a/cli/qmicli-nas.c b/cli/qmicli-nas.c<br>
> index 7e2fcb5..0bdaf4b 100644<br>
> --- a/cli/qmicli-nas.c<br>
> +++ b/cli/qmicli-nas.c<br>
> @@ -1268,7 +1268,7 @@ get_system_info_ready (QmiClientNas *client,<br>
> if (lac_valid)<br>
> g_print ("\t\tLocation Area Code: '%" G_GUINT16_FORMAT"'\n", lac);<br>
> if (cid_valid)<br>
> - g_print ("\t\tCell ID: '%" G_GUINT16_FORMAT"'\n", cid);<br>
> + g_print ("\t\tCell ID: '%" G_GUINT32_FORMAT"'\n", cid);<br>
> if (registration_reject_info_valid)<br>
> g_print ("\t\tRegistration reject: '%s' (%u)\n",<br>
> qmi_nas_network_service_domain_get_string (registration_reject_domain),<br>
> @@ -1388,7 +1388,7 @@ get_system_info_ready (QmiClientNas *client,<br>
> if (lac_valid)<br>
> g_print ("\t\tLocation Area Code: '%" G_GUINT16_FORMAT"'\n", lac);<br>
> if (cid_valid)<br>
> - g_print ("\t\tCell ID: '%" G_GUINT16_FORMAT"'\n", cid);<br>
> + g_print ("\t\tCell ID: '%" G_GUINT32_FORMAT"'\n", cid);<br>
> if (registration_reject_info_valid)<br>
> g_print ("\t\tRegistration reject: '%s' (%u)\n",<br>
> qmi_nas_network_service_domain_get_string (registration_reject_domain),<br>
> @@ -1502,7 +1502,7 @@ get_system_info_ready (QmiClientNas *client,<br>
> if (lac_valid)<br>
> g_print ("\t\tLocation Area Code: '%" G_GUINT16_FORMAT"'\n", lac);<br>
> if (cid_valid)<br>
> - g_print ("\t\tCell ID: '%" G_GUINT16_FORMAT"'\n", cid);<br>
> + g_print ("\t\tCell ID: '%" G_GUINT32_FORMAT"'\n", cid);<br>
> if (registration_reject_info_valid)<br>
> g_print ("\t\tRegistration reject: '%s' (%u)\n",<br>
> qmi_nas_network_service_domain_get_string (registration_reject_domain),<br>
> @@ -1623,7 +1623,7 @@ get_system_info_ready (QmiClientNas *client,<br>
> if (lac_valid)<br>
> g_print ("\t\tLocation Area Code: '%" G_GUINT16_FORMAT"'\n", lac);<br>
> if (cid_valid)<br>
> - g_print ("\t\tCell ID: '%" G_GUINT16_FORMAT"'\n", cid);<br>
> + g_print ("\t\tCell ID: '%" G_GUINT32_FORMAT"'\n", cid);<br>
> if (registration_reject_info_valid)<br>
> g_print ("\t\tRegistration reject: '%s' (%u)\n",<br>
> qmi_nas_network_service_domain_get_string (registration_reject_domain),<br>
><br>
<br>
<br>
--<br>
</div></div><span class="HOEnZb"><font color="#888888">Aleksander<br>
</font></span></blockquote></div><br></div>