Skip to contentSkip to conversation

Jan Kiszka : x86: Fix return type of DO_SYSCALL_INNER macro

Xenomai-core Gilles Chanteperdrix 2 participants 3 messages Apr 29, 2011 – Apr 30, 2011 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 8 lines · GIT version control
Module: xenomai-jki
Branch: for-upstream
Commit: 852c130d16410a597536c39d06b6abd1c9c6c822
URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=852c130d16410a597536c39d06b6abd1c9c6c822
Author: Jan Kiszka <[email protected]>
Date:   Fri Apr 29 14:12:13 2011 +0200
Quoted 7 lines

x86: Fix return type of DO_SYSCALL_INNER macro

gcc will complain about 'conversion to ‘int’ from ‘long int’ may alter its value' with -Wconversion as DO_SYSCALL treats the return value of DO_SYSCALL_INNER as int. Align DO_SYSCALL_INNER to its user.

Should not it be aligned the other way around? Using longs everywhere? In case a syscall returns a pointer?

Signature · 1 line
                                                                Gilles.
#2 lore raw
Quoted 11 lines · Gilles Chanteperdrix
Quoted 10 lines · GIT version control
Module: xenomai-jki
Branch: for-upstream
Commit: 852c130d16410a597536c39d06b6abd1c9c6c822
URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=852c130d16410a597536c39d06b6abd1c9c6c822
Author: Jan Kiszka <[email protected]>
Date:   Fri Apr 29 14:12:13 2011 +0200

x86: Fix return type of DO_SYSCALL_INNER macro

Quoted 8 lines
Quoted 5 lines

gcc will complain about 'conversion to ‘int’ from ‘long int’ may alter its value' with -Wconversion as DO_SYSCALL treats the return value of DO_SYSCALL_INNER as int. Align DO_SYSCALL_INNER to its user.

Should not it be aligned the other way around? Using longs everywhere? In case a syscall returns a pointer?

Maybe. But let's do this when we have a use case. Lots of arch macros, inline functions, and core code would have to be touched.

Jan

#3 lore raw
Quoted 16 lines · Jan Kiszka
Quoted 15 lines · Gilles Chanteperdrix
Quoted 14 lines · GIT version control
Module: xenomai-jki
Branch: for-upstream
Commit: 852c130d16410a597536c39d06b6abd1c9c6c822
URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=852c130d16410a597536c39d06b6abd1c9c6c822
Author: Jan Kiszka <[email protected]>
Date:   Fri Apr 29 14:12:13 2011 +0200

x86: Fix return type of DO_SYSCALL_INNER macro

gcc will complain about 'conversion to ‘int’ from ‘long int’ may alter its value' with -Wconversion as DO_SYSCALL treats the return value of DO_SYSCALL_INNER as int. Align DO_SYSCALL_INNER to its user.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Should not it be aligned the other way around? Using longs everywhere? In case a syscall returns a pointer?

Maybe. But let's do this when we have a use case. Lots of arch macros, inline functions, and core code would have to be touched.

Right, sorry for the noise.

Signature · 1 line
                                                                Gilles.