[PATCH] xmm: include string.h for strlen()

Aleksander Morgado aleksander at aleksander.es
Tue Aug 21 21:12:10 UTC 2018


On 21/08/18 23:03, Ben Chan wrote:
> This patch fixes the following compiler warning:
> 
> xmm/mm-modem-helpers-xmm.c:388:38: error: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-declaration]
>     g_regex_match_full (r, response, strlen (response), 0, 0, &match_info, &inner_error);
>                                      ^
> ---

Pushed, thanks

>  plugins/xmm/mm-modem-helpers-xmm.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/plugins/xmm/mm-modem-helpers-xmm.c b/plugins/xmm/mm-modem-helpers-xmm.c
> index a8ede4cf..1c2280af 100644
> --- a/plugins/xmm/mm-modem-helpers-xmm.c
> +++ b/plugins/xmm/mm-modem-helpers-xmm.c
> @@ -13,6 +13,8 @@
>   * Copyright (C) 2018 Aleksander Morgado <aleksander at aleksander.es>
>   */
>  
> +#include <string.h>
> +
>  #include "mm-log.h"
>  #include "mm-modem-helpers.h"
>  #include "mm-modem-helpers-xmm.h"
> 


-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list