#7 Variable declaration placement error

closed-fixed
nobody
None
5
2009-12-09
2009-12-01
jshvrsn
No

In static char *print_value(cJSON *item,int depth,int fmt) the first two lines need to be swapped so the variable declaration takes place before any other code so pedantic C compilers won't complain.

Change
if (!item) return 0;
char *out=0;
To
char *out=0;
if (!item) return 0;

Discussion

  • Dave Gamble

    Dave Gamble - 2009-12-09

    Oops! Thanks!! In rev25.

     
  • Dave Gamble

    Dave Gamble - 2009-12-09
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks