LINUX.ORG.RU

История изменений

Исправление Deleted, (текущая версия) :

Тему не читал. Код тоже не читал.

λ> clang -Wall test.c
test.c:29:20: warning: incompatible pointer types initializing 'uint8_t *' (aka 'unsigned char *') with an expression of type
      'unsigned char (*)[sizess]' [-Wincompatible-pointer-types]
          uint8_t* dd = &eee;
                   ^    ~~~~
test.c:46:11: error: use of undeclared identifier 'returnbufer'
          returnbufer;
          ^
test.c:59:37: error: use of undeclared identifier 'key'
  sprintf (kluch, "%s[%i]", "IEEE", key);
                                    ^
test.c:60:45: warning: incompatible pointer types passing 'char (*)[30]' to parameter of type 'char *' [-Wincompatible-pointer-types]
  char* dd = JSON_parse_key ("output.JSON", &kluch, strlen (kluch) );
                                            ^~~~~~
test.c:8:44: note: passing argument to parameter 'key' here
int JSON_parse_key (char* open_file, char* key, int size_key)
                                           ^
test.c:60:9: warning: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int';
  char* dd = JSON_parse_key ("output.JSON", &kluch, strlen (kluch) );
        ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings and 2 errors generated.

p.s. Не благодари.

Исходная версия Deleted, :

Тему не читал. Код тоже не читал.

λ> clang -Wall test.c
test.c:29:20: warning: incompatible pointer types initializing 'uint8_t *' (aka 'unsigned char *') with an expression of type
      'unsigned char (*)[sizess]' [-Wincompatible-pointer-types]
          uint8_t* dd = &eee;
                   ^    ~~~~
test.c:46:11: error: use of undeclared identifier 'returnbufer'
          returnbufer;
          ^
test.c:59:37: error: use of undeclared identifier 'key'
  sprintf (kluch, "%s[%i]", "IEEE", key);
                                    ^
test.c:60:45: warning: incompatible pointer types passing 'char (*)[30]' to parameter of type 'char *' [-Wincompatible-pointer-types]
  char* dd = JSON_parse_key ("output.JSON", &kluch, strlen (kluch) );
                                            ^~~~~~
test.c:8:44: note: passing argument to parameter 'key' here
int JSON_parse_key (char* open_file, char* key, int size_key)
                                           ^
test.c:60:9: warning: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int';
  char* dd = JSON_parse_key ("output.JSON", &kluch, strlen (kluch) );
        ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings and 2 errors generated.