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.
mumme
Posts: 3
Joined: Sat Jul 29, 2017 3:15 pm
Location: Sweden, Växjö
Has thanked: 1 time

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

Postby mumme » Sun Jul 21, 2019 11:04 pm

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.
github.com/mumme74

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

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

Postby Giovanni » Mon Jul 22, 2019 8:03 am

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

Giovanni

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

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

Postby Giovanni » Thu Aug 08, 2019 7:48 am

Fixed as bug #1040.

Giovanni

faisal
Posts: 374
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 44 times
Been thanked: 60 times

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

Postby faisal » Thu Aug 08, 2019 1:35 pm

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?


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 24 guests