Variable declarations in xcrypt.c

Roumen Petrov openssh at roumenpetrov.info
Mon Sep 8 17:57:05 EST 2003


Darren Tucker wrote:

>Hi All.
>	I noticed that xcrypt.c now has some variable declarations after code
>within a block (for some sets of #ifdef's).  Won't that choke some
>compilers?  Should it do something like the attached?
>  
>
This should work on all compilers.

Only aCC (HP) compiler fail on variable declaration with same name in blocks inside switch statement, i.e.
switch (...) {
  ...
  case ... 
    {
       int var;
       ...
    }
  ...
  case ... 
    {
       int var; /* FAIL ON HP. work arround - to rename variable */
       ...
    }
  ...
}






More information about the openssh-unix-dev mailing list