summaryrefslogtreecommitdiffstats
path: root/lor
diff options
context:
space:
mode:
Diffstat (limited to 'lor')
-rw-r--r--lor416
1 files changed, 416 insertions, 0 deletions
diff --git a/lor b/lor
new file mode 100644
index 0000000..222f4aa
--- /dev/null
+++ b/lor
@@ -0,0 +1,416 @@
+gcc -g -Ilib -Isrc -I. -pthread src/api.c -lcurl -odiscord.c
+src/api.c: In function ‘dc_client_init’:
+src/api.c:167:64: error: pasting "->" and "c" does not give a valid preprocessing token
+ #define DC_CILD(name) if (name##_lock) pthread_rwlock_destroy(c->##name##_lock, NULL)
+ ^~
+src/api.c:168:2: note: in expansion of macro ‘DC_CILD’
+ DC_CILD(c->authorization);
+ ^~~~~~~
+src/api.c:167:64: error: ‘struct dc_client’ has no member named ‘c’
+ #define DC_CILD(name) if (name##_lock) pthread_rwlock_destroy(c->##name##_lock, NULL)
+ ^~
+src/api.c:168:2: note: in expansion of macro ‘DC_CILD’
+ DC_CILD(c->authorization);
+ ^~~~~~~
+src/api.c:167:40: error: too many arguments to function ‘pthread_rwlock_destroy’
+ #define DC_CILD(name) if (name##_lock) pthread_rwlock_destroy(c->##name##_lock, NULL)
+ ^~~~~~~~~~~~~~~~~~~~~~
+src/api.c:168:2: note: in expansion of macro ‘DC_CILD’
+ DC_CILD(c->authorization);
+ ^~~~~~~
+In file included from src/api.c:16:
+/usr/include/pthread.h:894:12: note: declared here
+ extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
+ ^~~~~~~~~~~~~~~~~~~~~~
+src/api.c:167:64: error: pasting "->" and "c" does not give a valid preprocessing token
+ #define DC_CILD(name) if (name##_lock) pthread_rwlock_destroy(c->##name##_lock, NULL)
+ ^~
+src/api.c:169:2: note: in expansion of macro ‘DC_CILD’
+ DC_CILD(c->username);
+ ^~~~~~~
+src/api.c:167:64: error: ‘struct dc_client’ has no member named ‘c’
+ #define DC_CILD(name) if (name##_lock) pthread_rwlock_destroy(c->##name##_lock, NULL)
+ ^~
+src/api.c:169:2: note: in expansion of macro ‘DC_CILD’
+ DC_CILD(c->username);
+ ^~~~~~~
+src/api.c:167:40: error: too many arguments to function ‘pthread_rwlock_destroy’
+ #define DC_CILD(name) if (name##_lock) pthread_rwlock_destroy(c->##name##_lock, NULL)
+ ^~~~~~~~~~~~~~~~~~~~~~
+src/api.c:169:2: note: in expansion of macro ‘DC_CILD’
+ DC_CILD(c->username);
+ ^~~~~~~
+In file included from src/api.c:16:
+/usr/include/pthread.h:894:12: note: declared here
+ extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
+ ^~~~~~~~~~~~~~~~~~~~~~
+src/api.c:167:64: error: pasting "->" and "c" does not give a valid preprocessing token
+ #define DC_CILD(name) if (name##_lock) pthread_rwlock_destroy(c->##name##_lock, NULL)
+ ^~
+src/api.c:170:2: note: in expansion of macro ‘DC_CILD’
+ DC_CILD(c->guilds);
+ ^~~~~~~
+src/api.c:167:64: error: ‘struct dc_client’ has no member named ‘c’
+ #define DC_CILD(name) if (name##_lock) pthread_rwlock_destroy(c->##name##_lock, NULL)
+ ^~
+src/api.c:170:2: note: in expansion of macro ‘DC_CILD’
+ DC_CILD(c->guilds);
+ ^~~~~~~
+src/api.c:167:40: error: too many arguments to function ‘pthread_rwlock_destroy’
+ #define DC_CILD(name) if (name##_lock) pthread_rwlock_destroy(c->##name##_lock, NULL)
+ ^~~~~~~~~~~~~~~~~~~~~~
+src/api.c:170:2: note: in expansion of macro ‘DC_CILD’
+ DC_CILD(c->guilds);
+ ^~~~~~~
+In file included from src/api.c:16:
+/usr/include/pthread.h:894:12: note: declared here
+ extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
+ ^~~~~~~~~~~~~~~~~~~~~~
+src/api.c:167:64: error: pasting "->" and "c" does not give a valid preprocessing token
+ #define DC_CILD(name) if (name##_lock) pthread_rwlock_destroy(c->##name##_lock, NULL)
+ ^~
+src/api.c:171:2: note: in expansion of macro ‘DC_CILD’
+ DC_CILD(c->errors);
+ ^~~~~~~
+src/api.c:167:64: error: ‘struct dc_client’ has no member named ‘c’
+ #define DC_CILD(name) if (name##_lock) pthread_rwlock_destroy(c->##name##_lock, NULL)
+ ^~
+src/api.c:171:2: note: in expansion of macro ‘DC_CILD’
+ DC_CILD(c->errors);
+ ^~~~~~~
+src/api.c:167:40: error: too many arguments to function ‘pthread_rwlock_destroy’
+ #define DC_CILD(name) if (name##_lock) pthread_rwlock_destroy(c->##name##_lock, NULL)
+ ^~~~~~~~~~~~~~~~~~~~~~
+src/api.c:171:2: note: in expansion of macro ‘DC_CILD’
+ DC_CILD(c->errors);
+ ^~~~~~~
+In file included from src/api.c:16:
+/usr/include/pthread.h:894:12: note: declared here
+ extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
+ ^~~~~~~~~~~~~~~~~~~~~~
+src/api.c:167:64: error: pasting "->" and "c" does not give a valid preprocessing token
+ #define DC_CILD(name) if (name##_lock) pthread_rwlock_destroy(c->##name##_lock, NULL)
+ ^~
+src/api.c:172:2: note: in expansion of macro ‘DC_CILD’
+ DC_CILD(c->sent_messages);
+ ^~~~~~~
+src/api.c:167:64: error: ‘struct dc_client’ has no member named ‘c’
+ #define DC_CILD(name) if (name##_lock) pthread_rwlock_destroy(c->##name##_lock, NULL)
+ ^~
+src/api.c:172:2: note: in expansion of macro ‘DC_CILD’
+ DC_CILD(c->sent_messages);
+ ^~~~~~~
+src/api.c:167:40: error: too many arguments to function ‘pthread_rwlock_destroy’
+ #define DC_CILD(name) if (name##_lock) pthread_rwlock_destroy(c->##name##_lock, NULL)
+ ^~~~~~~~~~~~~~~~~~~~~~
+src/api.c:172:2: note: in expansion of macro ‘DC_CILD’
+ DC_CILD(c->sent_messages);
+ ^~~~~~~
+In file included from src/api.c:16:
+/usr/include/pthread.h:894:12: note: declared here
+ extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
+ ^~~~~~~~~~~~~~~~~~~~~~
+src/api.c: In function ‘dc_fetch_guilds’:
+src/api.c:403:29: error: expected ‘;’ before ‘{’ token
+ DC_CWLE(c, c->guilds_lock) {rs = -5; goto rc;}
+ ^
+In file included from src/api.c:11:
+src/api.c:405:21: error: ‘guild’ undeclared (first use in this function); did you mean ‘dc_guild’?
+ cJSON_ArrayForEach(guild, json) {
+ ^~~~~
+lib/cJSON.h:283:48: note: in definition of macro ‘cJSON_ArrayForEach’
+ #define cJSON_ArrayForEach(element, array) for(element = (array != NULL) ? (array)->child : NULL; element != NULL; element = element->next)
+ ^~~~~~~
+src/api.c:405:21: note: each undeclared identifier is reported only once for each function it appears in
+ cJSON_ArrayForEach(guild, json) {
+ ^~~~~
+lib/cJSON.h:283:48: note: in definition of macro ‘cJSON_ArrayForEach’
+ #define cJSON_ArrayForEach(element, array) for(element = (array != NULL) ? (array)->child : NULL; element != NULL; element = element->next)
+ ^~~~~~~
+src/api.c:424:28: error: expected ‘;’ before ‘{’ token
+ DC_CUE(c, c->guilds_lock) {rs = -6; goto rc;}
+ ^
+src/api.c:401:3: error: label ‘rc’ used but not defined
+ goto rc;
+ ^~~~
+src/api.c: In function ‘dc_fetch_channels’:
+src/api.c:435:26: warning: initialization of ‘struct dc_channel *’ from incompatible pointer type ‘struct dc_client *’ [-Wincompatible-pointer-types]
+ struct dc_channel * c = g->client;
+ ^
+src/api.c:438:7: error: ‘struct dc_channel’ has no member named ‘discriminator’
+ if (c->discriminator < 0)
+ ^~
+src/api.c:439:22: warning: passing argument 1 of ‘dc_login’ from incompatible pointer type [-Wincompatible-pointer-types]
+ if ((rs = dc_login(c)) < 0) {
+ ^
+src/api.c:262:34: note: expected ‘struct dc_client *’ but argument is of type ‘struct dc_channel *’
+ int dc_login (struct dc_client * c) { /* noui */
+ ~~~~~~~~~~~~~~~~~~~^
+src/api.c:22:46: error: ‘struct dc_channel’ has no member named ‘errors’
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~
+src/api.c:21:49: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:440:4: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ DC_CLIENT_ERROR(c, "dc_login(c) " DC_I18N_FAILED " (%d)", rs);
+ ^~~~~~~~~~~~~~~
+src/api.c:22:60: error: ‘struct dc_channel’ has no member named ‘errors_sizeof’; did you mean ‘messages_sizeof’?
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~~~~~~~~~~~~
+src/api.c:21:52: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:440:4: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ DC_CLIENT_ERROR(c, "dc_login(c) " DC_I18N_FAILED " (%d)", rs);
+ ^~~~~~~~~~~~~~~
+src/api.c:22:76: error: ‘struct dc_channel’ has no member named ‘errors_lock’
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~
+src/api.c:21:55: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:440:4: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ DC_CLIENT_ERROR(c, "dc_login(c) " DC_I18N_FAILED " (%d)", rs);
+ ^~~~~~~~~~~~~~~
+In file included from /usr/include/x86_64-linux-gnu/curl/curl.h:2826,
+ from src/api.c:6:
+src/api.c:449:20: error: ‘struct dc_channel’ has no member named ‘curl’
+ curl_easy_setopt(c->curl, CURLOPT_URL, url);
+ ^~
+src/api.c:450:20: error: ‘struct dc_channel’ has no member named ‘curl’
+ curl_easy_setopt(c->curl, CURLOPT_HTTPGET, 1L);
+ ^~
+src/api.c:451:20: error: ‘struct dc_channel’ has no member named ‘curl’
+ curl_easy_setopt(c->curl, CURLOPT_WRITEDATA, &s);
+ ^~
+src/api.c:452:27: error: ‘struct dc_channel’ has no member named ‘curl’
+ res = curl_easy_perform(c->curl);
+ ^~
+src/api.c:22:46: error: ‘struct dc_channel’ has no member named ‘errors’
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~
+src/api.c:21:49: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:454:3: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ DC_CLIENT_ERROR(c, "curl_easy_perform(c->curl) " DC_I18N_FAILED ": %s", curl_easy_strerror(res));
+ ^~~~~~~~~~~~~~~
+src/api.c:22:60: error: ‘struct dc_channel’ has no member named ‘errors_sizeof’; did you mean ‘messages_sizeof’?
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~~~~~~~~~~~~
+src/api.c:21:52: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:454:3: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ DC_CLIENT_ERROR(c, "curl_easy_perform(c->curl) " DC_I18N_FAILED ": %s", curl_easy_strerror(res));
+ ^~~~~~~~~~~~~~~
+src/api.c:22:76: error: ‘struct dc_channel’ has no member named ‘errors_lock’
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~
+src/api.c:21:55: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:454:3: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ DC_CLIENT_ERROR(c, "curl_easy_perform(c->curl) " DC_I18N_FAILED ": %s", curl_easy_strerror(res));
+ ^~~~~~~~~~~~~~~
+src/api.c:22:46: error: ‘struct dc_channel’ has no member named ‘errors’
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~
+src/api.c:21:49: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:462:4: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ DC_CLIENT_ERROR(c, "cJSON_Parse " DC_I18N_FAILED ": " DC_I18N_JSON_ERROR_BEFORE ": %s", error_ptr);
+ ^~~~~~~~~~~~~~~
+src/api.c:22:60: error: ‘struct dc_channel’ has no member named ‘errors_sizeof’; did you mean ‘messages_sizeof’?
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~~~~~~~~~~~~
+src/api.c:21:52: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:462:4: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ DC_CLIENT_ERROR(c, "cJSON_Parse " DC_I18N_FAILED ": " DC_I18N_JSON_ERROR_BEFORE ": %s", error_ptr);
+ ^~~~~~~~~~~~~~~
+src/api.c:22:76: error: ‘struct dc_channel’ has no member named ‘errors_lock’
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~
+src/api.c:21:55: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:462:4: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ DC_CLIENT_ERROR(c, "cJSON_Parse " DC_I18N_FAILED ": " DC_I18N_JSON_ERROR_BEFORE ": %s", error_ptr);
+ ^~~~~~~~~~~~~~~
+src/api.c:22:46: error: ‘struct dc_channel’ has no member named ‘errors’
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~
+src/api.c:21:49: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:464:4: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ DC_CLIENT_ERROR(c, "cJSON_Parse " DC_I18N_FAILED);
+ ^~~~~~~~~~~~~~~
+src/api.c:22:60: error: ‘struct dc_channel’ has no member named ‘errors_sizeof’; did you mean ‘messages_sizeof’?
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~~~~~~~~~~~~
+src/api.c:21:52: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:464:4: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ DC_CLIENT_ERROR(c, "cJSON_Parse " DC_I18N_FAILED);
+ ^~~~~~~~~~~~~~~
+src/api.c:22:76: error: ‘struct dc_channel’ has no member named ‘errors_lock’
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~
+src/api.c:21:55: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:464:4: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ DC_CLIENT_ERROR(c, "cJSON_Parse " DC_I18N_FAILED);
+ ^~~~~~~~~~~~~~~
+src/api.c:22:46: error: ‘struct dc_channel’ has no member named ‘errors’
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~
+src/api.c:21:49: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:470:3: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ DC_CLIENT_ERROR(c, "!cJSON_IsArray(json), s.ptr = %s", s.ptr);
+ ^~~~~~~~~~~~~~~
+src/api.c:22:60: error: ‘struct dc_channel’ has no member named ‘errors_sizeof’; did you mean ‘messages_sizeof’?
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~~~~~~~~~~~~
+src/api.c:21:52: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:470:3: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ DC_CLIENT_ERROR(c, "!cJSON_IsArray(json), s.ptr = %s", s.ptr);
+ ^~~~~~~~~~~~~~~
+src/api.c:22:76: error: ‘struct dc_channel’ has no member named ‘errors_lock’
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~
+src/api.c:21:55: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:470:3: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ DC_CLIENT_ERROR(c, "!cJSON_IsArray(json), s.ptr = %s", s.ptr);
+ ^~~~~~~~~~~~~~~
+src/api.c:475:18: error: ‘struct dc_channel’ has no member named ‘guilds_lock’
+ if (DC_CWLE(c, c->guilds_lock)) {rs = -7; goto rc;}
+ ^~
+src/api.c:26:49: note: in definition of macro ‘DC_CWLE’
+ #define DC_CWLE(c, name) (pthread_rwlock_wrlock(name) ? (DC_CLIENT_ERROR(c, DC_I18N_LOCKING " " #name " " DC_I18N_FAILED) || 1) : 0)
+ ^~~~
+src/api.c:22:46: error: ‘struct dc_channel’ has no member named ‘errors’
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~
+src/api.c:21:49: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:26:58: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ #define DC_CWLE(c, name) (pthread_rwlock_wrlock(name) ? (DC_CLIENT_ERROR(c, DC_I18N_LOCKING " " #name " " DC_I18N_FAILED) || 1) : 0)
+ ^~~~~~~~~~~~~~~
+src/api.c:475:6: note: in expansion of macro ‘DC_CWLE’
+ if (DC_CWLE(c, c->guilds_lock)) {rs = -7; goto rc;}
+ ^~~~~~~
+src/api.c:22:60: error: ‘struct dc_channel’ has no member named ‘errors_sizeof’; did you mean ‘messages_sizeof’?
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~~~~~~~~~~~~
+src/api.c:21:52: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:26:58: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ #define DC_CWLE(c, name) (pthread_rwlock_wrlock(name) ? (DC_CLIENT_ERROR(c, DC_I18N_LOCKING " " #name " " DC_I18N_FAILED) || 1) : 0)
+ ^~~~~~~~~~~~~~~
+src/api.c:475:6: note: in expansion of macro ‘DC_CWLE’
+ if (DC_CWLE(c, c->guilds_lock)) {rs = -7; goto rc;}
+ ^~~~~~~
+src/api.c:22:76: error: ‘struct dc_channel’ has no member named ‘errors_lock’
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~
+src/api.c:21:55: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:26:58: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ #define DC_CWLE(c, name) (pthread_rwlock_wrlock(name) ? (DC_CLIENT_ERROR(c, DC_I18N_LOCKING " " #name " " DC_I18N_FAILED) || 1) : 0)
+ ^~~~~~~~~~~~~~~
+src/api.c:475:6: note: in expansion of macro ‘DC_CWLE’
+ if (DC_CWLE(c, c->guilds_lock)) {rs = -7; goto rc;}
+ ^~~~~~~
+In file included from src/api.c:11:
+src/api.c:476:21: error: ‘channel’ undeclared (first use in this function); did you mean ‘dc_channel’?
+ cJSON_ArrayForEach(channel, json) {
+ ^~~~~~~
+lib/cJSON.h:283:48: note: in definition of macro ‘cJSON_ArrayForEach’
+ #define cJSON_ArrayForEach(element, array) for(element = (array != NULL) ? (array)->child : NULL; element != NULL; element = element->next)
+ ^~~~~~~
+src/api.c:22:46: error: ‘struct dc_channel’ has no member named ‘errors’
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~
+src/api.c:21:49: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:482:4: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ DC_CLIENT_ERROR(c, "!id || !name || type == NAN");
+ ^~~~~~~~~~~~~~~
+src/api.c:22:60: error: ‘struct dc_channel’ has no member named ‘errors_sizeof’; did you mean ‘messages_sizeof’?
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~~~~~~~~~~~~
+src/api.c:21:52: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:482:4: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ DC_CLIENT_ERROR(c, "!id || !name || type == NAN");
+ ^~~~~~~~~~~~~~~
+src/api.c:22:76: error: ‘struct dc_channel’ has no member named ‘errors_lock’
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~
+src/api.c:21:55: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:482:4: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ DC_CLIENT_ERROR(c, "!id || !name || type == NAN");
+ ^~~~~~~~~~~~~~~
+src/api.c:503:17: error: ‘struct dc_channel’ has no member named ‘guilds_lock’
+ if (DC_CUE(c, c->guilds_lock)) {rs = -8; goto rc;}
+ ^~
+src/api.c:28:48: note: in definition of macro ‘DC_CUE’
+ #define DC_CUE(c, name) (pthread_rwlock_unlock(name) ?(DC_CLIENT_ERROR(c, DC_I18N_UNLOCKING " " #name " " DC_I18N_FAILED) || 1) : 0)
+ ^~~~
+src/api.c:22:46: error: ‘struct dc_channel’ has no member named ‘errors’
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~
+src/api.c:21:49: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:28:56: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ #define DC_CUE(c, name) (pthread_rwlock_unlock(name) ?(DC_CLIENT_ERROR(c, DC_I18N_UNLOCKING " " #name " " DC_I18N_FAILED) || 1) : 0)
+ ^~~~~~~~~~~~~~~
+src/api.c:503:6: note: in expansion of macro ‘DC_CUE’
+ if (DC_CUE(c, c->guilds_lock)) {rs = -8; goto rc;}
+ ^~~~~~
+src/api.c:22:60: error: ‘struct dc_channel’ has no member named ‘errors_sizeof’; did you mean ‘messages_sizeof’?
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~~~~~~~~~~~~
+src/api.c:21:52: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:28:56: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ #define DC_CUE(c, name) (pthread_rwlock_unlock(name) ?(DC_CLIENT_ERROR(c, DC_I18N_UNLOCKING " " #name " " DC_I18N_FAILED) || 1) : 0)
+ ^~~~~~~~~~~~~~~
+src/api.c:503:6: note: in expansion of macro ‘DC_CUE’
+ if (DC_CUE(c, c->guilds_lock)) {rs = -8; goto rc;}
+ ^~~~~~
+src/api.c:22:76: error: ‘struct dc_channel’ has no member named ‘errors_lock’
+ #define DC_CLIENT_ERROR(c, m, ...) DC_ERROR(c->errors, &c->errors_sizeof, c->errors_lock, m __VA_OPT__(,) __VA_ARGS__) /* yeah, that m is not a typo */
+ ^~
+src/api.c:21:55: note: in definition of macro ‘DC_ERROR’
+ #define DC_ERROR(e, s, l, m, ...) dc_push_error(e, s, l, __func__, __FILE__, __LINE__, 0##__VA_OPT__(1), m __VA_OPT__(,) __VA_ARGS__)
+ ^
+src/api.c:28:56: note: in expansion of macro ‘DC_CLIENT_ERROR’
+ #define DC_CUE(c, name) (pthread_rwlock_unlock(name) ?(DC_CLIENT_ERROR(c, DC_I18N_UNLOCKING " " #name " " DC_I18N_FAILED) || 1) : 0)
+ ^~~~~~~~~~~~~~~
+src/api.c:503:6: note: in expansion of macro ‘DC_CUE’
+ if (DC_CUE(c, c->guilds_lock)) {rs = -8; goto rc;}
+ ^~~~~~
+make: *** [Makefile:2: default] Error 1