diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2013-02-26 22:02:30 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2013-02-26 22:07:55 +0000 |
commit | e6f55240a1d599adb160ced4bdad36d8f1fd7b92 (patch) | |
tree | 74850493155edf4e0bff88f9353a66eb2c7edf81 /syscall.c | |
parent | 905e8e0e2f0a1f51ab92424dcb005885ea8b2459 (diff) | |
download | strace-e6f55240a1d599adb160ced4bdad36d8f1fd7b92.tar.gz strace-e6f55240a1d599adb160ced4bdad36d8f1fd7b92.tar.bz2 strace-e6f55240a1d599adb160ced4bdad36d8f1fd7b92.tar.xz |
Fix compilation errors uncovered by -Werror=enum-compare
This fixes regression introduced by commit v4.7-111-g9cbc15b.
* syscall.c: Merge all nsyscalls* enums into single enum.
Likewise merge nerrnos*, nsignals*, and nioctlents* into single enums.
Diffstat (limited to 'syscall.c')
-rw-r--r-- | syscall.c | 52 |
1 files changed, 40 insertions, 12 deletions
@@ -162,10 +162,6 @@ const char *const signalent0[] = { const struct_ioctlent ioctlent0[] = { #include "ioctlent.h" }; -enum { nsyscalls0 = ARRAY_SIZE(sysent0) }; -enum { nerrnos0 = ARRAY_SIZE(errnoent0) }; -enum { nsignals0 = ARRAY_SIZE(signalent0) }; -enum { nioctlents0 = ARRAY_SIZE(ioctlent0) }; #if SUPPORTED_PERSONALITIES > 1 static const char *const errnoent1[] = { @@ -177,10 +173,6 @@ static const char *const signalent1[] = { static const struct_ioctlent ioctlent1[] = { # include "ioctlent1.h" }; -enum { nsyscalls1 = ARRAY_SIZE(sysent1) }; -enum { nerrnos1 = ARRAY_SIZE(errnoent1) }; -enum { nsignals1 = ARRAY_SIZE(signalent1) }; -enum { nioctlents1 = ARRAY_SIZE(ioctlent1) }; #endif #if SUPPORTED_PERSONALITIES > 2 @@ -193,12 +185,48 @@ static const char *const signalent2[] = { static const struct_ioctlent ioctlent2[] = { # include "ioctlent2.h" }; -enum { nsyscalls2 = ARRAY_SIZE(sysent2) }; -enum { nerrnos2 = ARRAY_SIZE(errnoent2) }; -enum { nsignals2 = ARRAY_SIZE(signalent2) }; -enum { nioctlents2 = ARRAY_SIZE(ioctlent2) }; #endif +enum { + nsyscalls0 = ARRAY_SIZE(sysent0) +#if SUPPORTED_PERSONALITIES > 1 + , nsyscalls1 = ARRAY_SIZE(sysent1) +# if SUPPORTED_PERSONALITIES > 2 + , nsyscalls2 = ARRAY_SIZE(sysent2) +# endif +#endif +}; + +enum { + nerrnos0 = ARRAY_SIZE(errnoent0) +#if SUPPORTED_PERSONALITIES > 1 + , nerrnos1 = ARRAY_SIZE(errnoent1) +# if SUPPORTED_PERSONALITIES > 2 + , nerrnos2 = ARRAY_SIZE(errnoent2) +# endif +#endif +}; + +enum { + nsignals0 = ARRAY_SIZE(signalent0) +#if SUPPORTED_PERSONALITIES > 1 + , nsignals1 = ARRAY_SIZE(signalent1) +# if SUPPORTED_PERSONALITIES > 2 + , nsignals2 = ARRAY_SIZE(signalent2) +# endif +#endif +}; + +enum { + nioctlents0 = ARRAY_SIZE(ioctlent0) +#if SUPPORTED_PERSONALITIES > 1 + , nioctlents1 = ARRAY_SIZE(ioctlent1) +# if SUPPORTED_PERSONALITIES > 2 + , nioctlents2 = ARRAY_SIZE(ioctlent2) +# endif +#endif +}; + #if SUPPORTED_PERSONALITIES > 1 const struct_sysent *sysent = sysent0; const char *const *errnoent = errnoent0; |