Re: [riot-devel] Coding conventions amendment

2016-10-14 Thread Ludwig Knüpfer
Hi, Am 14. Oktober 2016 12:30:25 MESZ, schrieb Oleg Hahm : >Hi Ludwig! > >On Fri, Oct 14, 2016 at 12:26:19PM +0200, Ludwig Knüpfer wrote: >> Am 14. Oktober 2016 10:04:07 MESZ, schrieb Oleg Hahm >: >> >On Fri, Oct 14, 2016 at 09:13:50AM +0200, Ludwig Knüpfer wrote: >> >> In general it is safer to e

Re: [riot-devel] Coding conventions amendment

2016-10-14 Thread Oleg Hahm
Hi Ludwig! On Fri, Oct 14, 2016 at 12:26:19PM +0200, Ludwig Knüpfer wrote: > Am 14. Oktober 2016 10:04:07 MESZ, schrieb Oleg Hahm : > >On Fri, Oct 14, 2016 at 09:13:50AM +0200, Ludwig Knüpfer wrote: > >> In general it is safer to explicate the integer width. As RIOT is > >> targeted at 32 bit arch

Re: [riot-devel] Coding conventions amendment

2016-10-14 Thread Ludwig Knüpfer
Hi, Am 14. Oktober 2016 10:04:07 MESZ, schrieb Oleg Hahm : >Hi Ludwig! > >On Fri, Oct 14, 2016 at 09:13:50AM +0200, Ludwig Knüpfer wrote: >> In general it is safer to explicate the integer width. As RIOT is >targeted >> at 32 bit architectures, > >I object! With what exactly? Cheers, Ludwig

Re: [riot-devel] Coding conventions amendment

2016-10-14 Thread Kees Bakker
On 14-10-16 10:05, Oleg Hahm wrote: Hi Kees! On Fri, Oct 14, 2016 at 08:05:51AM +0200, Kees Bakker wrote: On 13-10-16 22:42, Kaspar Schleiser wrote: On 10/13/2016 09:43 PM, Kees Bakker wrote: Does anybody object to adding this to the coding conventions explicitly? What about `size_t`? +1 f

Re: [riot-devel] Coding conventions amendment

2016-10-14 Thread Joakim Nohlgård
I agree with the general idea of this thread. In my opinion, integer widths should only be specified in cases where the developer needs to know the exact width, for example in network protocols or when interfacing with hardware. In normal program logic the variables should be using the general typ

Re: [riot-devel] Coding conventions amendment

2016-10-14 Thread Oleg Hahm
Hi Kees! On Fri, Oct 14, 2016 at 08:05:51AM +0200, Kees Bakker wrote: > On 13-10-16 22:42, Kaspar Schleiser wrote: > > On 10/13/2016 09:43 PM, Kees Bakker wrote: > > > > > Does anybody object to adding this to the coding > > > > > > > conventions explicitly? > > > > > What about `size_t`? > > > +1

Re: [riot-devel] Coding conventions amendment

2016-10-14 Thread Oleg Hahm
Hi Ludwig! On Fri, Oct 14, 2016 at 09:13:50AM +0200, Ludwig Knüpfer wrote: > In general it is safer to explicate the integer width. As RIOT is targeted > at 32 bit architectures, I object! Cheers, Oleg -- rio_dprintk (RIO_DEBUG_ROUTE, "LIES! DAMN LIES! %d LIES!\n",Lies); linux-2.6.6/dri

Re: [riot-devel] Coding conventions amendment

2016-10-14 Thread Ludwig Knüpfer
Hi, Am 14. Oktober 2016 08:05:51 MESZ, schrieb Kees Bakker : >But I believe the question was more, in case of an unsigned type, >should we use "unsigned int" or size_t. In that case I would go for >size_t. BTW: there is also the signed type `ssize_t`. Cheers, Ludwig _

Re: [riot-devel] Coding conventions amendment

2016-10-14 Thread Ludwig Knüpfer
Hi, Am 13. Oktober 2016 22:42:11 MESZ, schrieb Kaspar Schleiser : >Hi, > >On 10/13/2016 09:43 PM, Kees Bakker wrote: Does anybody object to adding this to the coding >> conventions explicitly? >>> > What about `size_t`? >> +1 for size_t > >Well, any convention would need careful wording