linux-sunxi/sunxi-tools — pull request #30 by rayjanwilson (2014-10-06 08:48:16+00:00)
Title: received a warning about attempting to concatenate an int with a string

the warning received:

```bash
make bin2fex
gcc -g -O0 -Wall -Wextra -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/ -o fexc fexc.c script.c script_uboot.c script_bin.c script_fex.c
fexc.c:250:36: warning: adding 'int' to a string does not append to the string
[-Wstring-plus-int]
const char *opt_string = "I:O:vq?"+ ((app_mode == 0)? 0: 4);
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
fexc.c:250:36: note: use array indexing to silence this warning
const char *opt_string = "I:O:vq?"+ ((app_mode == 0)? 0: 4);
^
& [ ]
1 warning generated.
ln -s fexc bin2fex
```

the fix done here was to make two string buffers and concatenate them together. since itoa() is not standard, but sprintf() is, i used sprintf() to convert from an int to string.