Record Detail

Compile Error

In file included from /in/driver/main.c:9:
/in/correct/dlist.h:13:1: error: unknown type name 'typdef'; did you mean 'typedef'?
typdef enum dlistSortMethod_t {
^~~~~~
typedef
/in/correct/dlist.h:41:18: error: unknown type name 'dilst'
void dlistAppend(dilst this, const char *key, dlistValue value);
                 ^
2 errors generated.
In file included from /in/correct/dlist.c:1:
/in/correct/dlist.h:13:1: error: unknown type name 'typdef'; did you mean 'typedef'?
typdef enum dlistSortMethod_t {
^~~~~~
typedef
/in/correct/dlist.h:41:18: error: unknown type name 'dilst'
void dlistAppend(dilst this, const char *key, dlistValue value);
                 ^
/in/correct/dlist.c:27:7: error: use of undeclared identifier 'type'
  if (type == 0x01) {
      ^
/in/correct/dlist.c:28:9: error: member reference base type 'dlist' (aka 'void *') is not a structure or union
    this.dlistValue = strcat(key,itoa(value));
    ~~~~^~~~~~~~~~~
/in/correct/dlist.c:28:34: error: implicit declaration of function 'itoa' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    this.dlistValue = strcat(key,itoa(value));
                                 ^
/in/correct/dlist.c:28:30: error: passing 'const char *' to parameter of type 'char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
    this.dlistValue = strcat(key,itoa(value));
                             ^~~
/usr/include/string.h:129:39: note: passing argument to parameter '__dest' here
extern char *strcat (char *__restrict __dest, const char *__restrict __src)
                                      ^
/in/correct/dlist.c:28:34: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const char *' [-Werror,-Wint-conversion]
    this.dlistValue = strcat(key,itoa(value));
                                 ^~~~~~~~~~~
/usr/include/string.h:129:70: note: passing argument to parameter '__src' here
extern char *strcat (char *__restrict __dest, const char *__restrict __src)
                                                                     ^
/in/correct/dlist.c:29:14: error: use of undeclared identifier 'type'
  } else if (type == 0x02) {
             ^
/in/correct/dlist.c:30:9: error: member reference base type 'dlist' (aka 'void *') is not a structure or union
    this.dlistValue = strcat(key,value);
    ~~~~^~~~~~~~~~~
/in/correct/dlist.c:30:30: error: passing 'const char *' to parameter of type 'char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
    this.dlistValue = strcat(key,value);
                             ^~~
/usr/include/string.h:129:39: note: passing argument to parameter '__dest' here
extern char *strcat (char *__restrict __dest, const char *__restrict __src)
                                      ^
/in/correct/dlist.c:30:34: error: passing 'dlistValue' (aka 'union dlistValue_t') to parameter of incompatible type 'const char *'
    this.dlistValue = strcat(key,value);
                                 ^~~~~
/usr/include/string.h:129:70: note: passing argument to parameter '__src' here
extern char *strcat (char *__restrict __dest, const char *__restrict __src)
                                                                     ^
/in/correct/dlist.c:31:14: error: use of undeclared identifier 'type'
  } else if (type == 0x03) {
             ^
/in/correct/dlist.c:32:9: error: member reference base type 'dlist' (aka 'void *') is not a structure or union
    this.dlistValue = strcat(key,ftoa(value));
    ~~~~^~~~~~~~~~~
/in/correct/dlist.c:32:34: error: implicit declaration of function 'ftoa' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    this.dlistValue = strcat(key,ftoa(value));
                                 ^
/in/correct/dlist.c:32:30: error: passing 'const char *' to parameter of type 'char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
    this.dlistValue = strcat(key,ftoa(value));
                             ^~~
/usr/include/string.h:129:39: note: passing argument to parameter '__dest' here
extern char *strcat (char *__restrict __dest, const char *__restrict __src)
                                      ^
/in/correct/dlist.c:32:34: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const char *' [-Werror,-Wint-conversion]
    this.dlistValue = strcat(key,ftoa(value));
                                 ^~~~~~~~~~~
/usr/include/string.h:129:70: note: passing argument to parameter '__src' here
extern char *strcat (char *__restrict __dest, const char *__restrict __src)
                                                                     ^
/in/correct/dlist.c:35:9: error: member reference base type 'dlist' (aka 'void *') is not a structure or union
    this.dlistValue = strcat(key,(char*)value);
    ~~~~^~~~~~~~~~~
/in/correct/dlist.c:35:41: error: operand of type 'dlistValue' (aka 'union dlistValue_t') where arithmetic or pointer type is required
    this.dlistValue = strcat(key,(char*)value);
                                        ^~~~~
/in/correct/dlist.c:41:48: error: incompatible integer to pointer conversion passing 'dlistSortMethod' (aka 'enum dlistSortMethod_t') to parameter of type '__compar_fn_t' (aka 'int (*)(const void *, const void *)') [-Werror,-Wint-conversion]
    qsort(listDst, sizeof(this), sizeof(this), method);
                                               ^~~~~~
/usr/include/stdlib.h:828:20: note: passing argument to parameter '__compar' here
                   __compar_fn_t __compar) __nonnull ((1, 4));
                                 ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

Information

Submit By
Type
Submission
Homework
Lab 7: Debugging Lab
Language
C (Clang, with memory check)
Submit At
2018-11-19 20:32:21
Judged At
2018-11-19 20:32:21
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes