Re: [riot-devel] size_t vs int usage

2018-06-27 Thread Neil Jones
> "and how come no one else is getting this error ?"

> Probably you are the first to build it with GCC 7.x :)

gcc version 4.9.2 (Codescape GNU Tools 2016.05-03 for MIPS MTI Bare Metal)






On Wed, Jun 27, 2018 at 2:36 PM, Oleg Artamonov  wrote:

> "and how come no one else is getting this error ?"
>
> Probably you are the first to build it with GCC 7.x :)
>
> It has stricter rules regarding variable types.
>
> --
> *Sincerely yours,*
> *Oleg Artamonov*
> *+7 (916) 631-34-90*
> *www.unwds.com* 
>
>
>
> 27.06.2018, 16:03, "Neil Jones" :
>
> I'm getting several failures on MIPS with size_t vs int usage in this PR
> (#9368)
>
> eg:
>
>
> Building application "tests_driver_ata8520e" for "pic32-clicker" with MCU 
> "mips_pic32mx".
>
> main.c: In function 'ata8520e_sigfox_cmd':
> main.c:84:24: error: format '%d' expects argument of type 'int', but argument 
> 3 has type 'size_t' [-Werror=format=]
> "message length is %d", SIGFOX_MAX_TX_LENGTH, 
> strlen(argv[2]));
>
>
> IIRC size_t is unsigned so the error is correct, how did this code get 
> upstream, and how come no one else is getting this error ?
>
>
> I presume the fact that this PR add SPI support for MIPS(PIC32) these drivers 
> are now getting built for MIPS, but how is this not a failure on other 
> architectures ?
>
>
> Should I fix these in this PR or create another one ?
>
>
> Cheers,
>
>
> Neil
>
>
>
>
>
> ,
>
> ___
> devel mailing list
> devel@riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>
>
> ___
> devel mailing list
> devel@riot-os.org
> https://lists.riot-os.org/mailman/listinfo/devel
>
>
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] size_t vs int usage

2018-06-27 Thread Oleg Artamonov
"and how come no one else is getting this error ?" Probably you are the first to build it with GCC 7.x :) It has stricter rules regarding variable types. -- Sincerely yours,Oleg Artamonov+7 (916) 631-34-90www.unwds.com   27.06.2018, 16:03, "Neil Jones" :I'm getting several failures on MIPS with size_t vs int usage in this PR (#9368) eg: Building application "tests_driver_ata8520e" for "pic32-clicker" with MCU "mips_pic32mx".

main.c: In function 'ata8520e_sigfox_cmd':
main.c:84:24: error: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Werror=format=]
"message length is %d", SIGFOX_MAX_TX_LENGTH, strlen(argv[2]));

IIRC size_t is unsigned so the error is correct, how did this code get upstream, and how come no one else is getting this error ?

I presume the fact that this PR add SPI support for MIPS(PIC32) these drivers are now getting built for MIPS, but how is this not a failure on other architectures ?

Should I fix these in this PR or create another one ?

Cheers,

Neil

 
 ,___devel mailing listdevel@riot-os.orghttps://lists.riot-os.org/mailman/listinfo/devel
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


Re: [riot-devel] size_t vs int usage

2018-06-27 Thread Kaspar Schleiser
Hi Neil,

On 06/27/2018 03:03 PM, Neil Jones wrote:
> IIRC size_t is unsigned so the error is correct, how did this code get
> upstream, and how come no one else is getting this error ?

I suppose the toolchain is compiled with different default warning flags.

> I presume the fact that this PR add SPI support for MIPS(PIC32) these
> drivers are now getting built for MIPS, but how is this not a failure
> on other architectures ?
> 
> Should I fix these in this PR or create another one ?

Usually another PR (or even multiples) are preferable. Trivial one-line
PR's are usually merged *very* quickly. :)

Kaspar
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel


[riot-devel] size_t vs int usage

2018-06-27 Thread Neil Jones
I'm getting several failures on MIPS with size_t vs int usage in this PR
(#9368)

eg:

Building application "tests_driver_ata8520e" for "pic32-clicker" with
MCU "mips_pic32mx".

main.c: In function 'ata8520e_sigfox_cmd':
main.c:84:24: error: format '%d' expects argument of type 'int', but
argument 3 has type 'size_t' [-Werror=format=]
"message length is %d", SIGFOX_MAX_TX_LENGTH,
strlen(argv[2]));

IIRC size_t is unsigned so the error is correct, how did this code get
upstream, and how come no one else is getting this error ?

I presume the fact that this PR add SPI support for MIPS(PIC32) these
drivers are now getting built for MIPS, but how is this not a failure
on other architectures ?

Should I fix these in this PR or create another one ?

Cheers,

Neil
___
devel mailing list
devel@riot-os.org
https://lists.riot-os.org/mailman/listinfo/devel