Page 1 of 1

hal_files.h error in fileStreamGetSize: ')' at wrong place

Posted: Sun Jul 21, 2019 11:04 pm
by mumme
Hi!

I'm using 19.1.3, but it is the same in master.

Compile error In macro fileStreamGetSize:

Code: Select all

../../../ChibiOS-git/os/hal/include/hal_files.h:210:40: error: too few arguments to function 'dtcFile->vmt->getsize'
 #define fileStreamGetSize(ip, offset) ((ip)->vmt->getsize(ip), offset)
                                        ^


I expect it to be: (moved parenthesis)

Code: Select all

 #define fileStreamGetSize(ip, offset) ((ip)->vmt->getsize(ip, offset))


Is this correct?
Seems to work fine when i move the parenthesis.

Re: hal_files.h error in fileStreamGetSize: ')' at wrong place

Posted: Mon Jul 22, 2019 8:03 am
by Giovanni
Thanks, that interface is not yet used, will fix it.

Giovanni

Re: hal_files.h error in fileStreamGetSize: ')' at wrong place

Posted: Thu Aug 08, 2019 7:48 am
by Giovanni
Fixed as bug #1040.

Giovanni

Re: hal_files.h error in fileStreamGetSize: ')' at wrong place

Posted: Thu Aug 08, 2019 1:35 pm
by faisal
mumme wrote:Hi!

I'm using 19.1.3, but it is the same in master.

Compile error In macro fileStreamGetSize:

Code: Select all

../../../ChibiOS-git/os/hal/include/hal_files.h:210:40: error: too few arguments to function 'dtcFile->vmt->getsize'
 #define fileStreamGetSize(ip, offset) ((ip)->vmt->getsize(ip), offset)
                                        ^


I expect it to be: (moved parenthesis)

Code: Select all

 #define fileStreamGetSize(ip, offset) ((ip)->vmt->getsize(ip, offset))


Is this correct?
Seems to work fine when i move the parenthesis.


Are you using this interface? Care to share how you're using it?