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

Report here problems in any of ChibiOS components. This forum is NOT for support.
Post Reply
mumme
Posts: 3
Joined: Sat Jul 29, 2017 3:15 pm
Has thanked: 1 time

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

Post 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.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

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

Post by Giovanni »

Thanks, that interface is not yet used, will fix it.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

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

Post by Giovanni »

Fixed as bug #1040.

Giovanni
faisal
Posts: 382
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 45 times
Been thanked: 62 times

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

Post 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?
Post Reply