On Fri, 2008-10-24 at 09:07 -0700, CAI Qian wrote:
> Hi,
> 
> The following hack fixes the "endian_switch01.c:115: warning: ‘main’ takes 
> only zero or two
> arguments" warning.
> 
> Signed-off-by: CAI Qian <[EMAIL PROTECTED]>
> 

Thanks Cai.

Regards--
Subrata

> --- testarea/ltp/testcases/kernel/syscalls/switch/endian_switch01.c.orig      
> 2008-10-24
> 11:54:23.000000000 -0400
> +++ testarea/ltp/testcases/kernel/syscalls/switch/endian_switch01.c   
> 2008-10-24 11:55:53.000000000
> -0400
> @@ -74,6 +74,9 @@
>          TEST_PAUSE;
>  
>  }
> +
> +extern int main4(int ac, char **av, char **envp, unsigned long *auxv)
> +__asm ("main");
>  #endif
>  
>  void cleanup() {
> @@ -112,7 +115,7 @@
>                    : "cr0", "r9", "r10", "r11", "r12");
>  }
>  
> -int main(int ac, char **av, char **envp, unsigned long *auxv) {
> +int main4(int ac, char **av, char **envp, unsigned long *auxv) {
>          setup();
>       for (; *auxv != AT_NULL && *auxv != AT_HWCAP; auxv += 2)
>               ;
> 
> 
> 
> --- CAI Qian <[EMAIL PROTECTED]> wrote:
> 
> > Hi,
> > 
> > The latest CVS tree has a compilation warning on PPC64,
> > 
> > endian_switch01.c:115: warning: ‘main’ takes only zero or two arguments
> > 
> > >From the test case code 
> > >(./testcases/kernel/syscalls/switch/endian_switch01.c),
> > 
> > #if defined (__powerpc64__) || (__powerpc__)
> > #ifndef PPC_FEATURE_TRUE_LE 
> >     #define PPC_FEATURE_TRUE_LE              0x00000002
> > #endif
> > 
> > #include <asm/cputable.h>
> > 
> > volatile int got_sigill;
> > sigjmp_buf jb;
> > 
> > void sigill(int sig) {
> >         got_sigill = 1;
> >         siglongjmp(jb, 1);
> > }
> > 
> > void do_le_switch(void) {
> >         register int r0 asm("r0");
> > 
> >         r0 = 0x1ebe;
> >         asm volatile("sc; .long 0x02000044"
> >                      : "=&r" (r0) : "0" (r0)
> >                      : "cr0", "r9", "r10", "r11", "r12");
> > }
> > 
> > 
> > int main(int ac, char **av, char **envp, unsigned long *auxv) {   <---- 
> > line 115
> >         setup();
> >         for (; *auxv != AT_NULL && *auxv != AT_HWCAP; auxv += 2)
> >                 ;
> >         if (!(auxv[0] == AT_HWCAP && (auxv[1] & PPC_FEATURE_TRUE_
> > 
> > I am not familiar why PPC64's main() has 4 arguments. Does the warning 
> > signal a potential
> > problem?
> > Is it possible to fix it?
> > 
> > Cai Qian
> > 
> > 
> > -------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> > Build the coolest Linux based applications with Moblin SDK & win great 
> > prizes
> > Grand prize is a trip for two to an Open Source event anywhere in the world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > _______________________________________________
> > Ltp-list mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/ltp-list
> > 
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Ltp-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ltp-list


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to