{"action":"closed","issue":{"url":"https://api.github.com/repos/vysheng/tg/issues/742","labels_url":"https://api.github.com/repos/vysheng/tg/issues/742/labels{/name}","comments_url":"https://api.github.com/repos/vysheng/tg/issues/742/comments","events_url":"https://api.github.com/repos/vysheng/tg/issues/742/events","html_url":"https://github.com/vysheng/tg/issues/742","id":101509452,"number":742,"title":"Compilation error in loop.c","user":{"login":"proycon","id":75427,"avatar_url":"https://avatars.githubusercontent.com/u/75427?v=3","gravatar_id":"","url":"https://api.github.com/users/proycon","html_url":"https://github.com/proycon","followers_url":"https://api.github.com/users/proycon/followers","following_url":"https://api.github.com/users/proycon/following{/other_user}","gists_url":"https://api.github.com/users/proycon/gists{/gist_id}","starred_url":"https://api.github.com/users/proycon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/proycon/subscriptions","organizations_url":"https://api.github.com/users/proycon/orgs","repos_url":"https://api.github.com/users/proycon/repos","events_url":"https://api.github.com/users/proycon/events{/privacy}","received_events_url":"https://api.github.com/users/proycon/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-17T21:03:58Z","updated_at":"2015-08-17T21:11:49Z","closed_at":"2015-08-17T21:11:49Z","body":"I'm trying to update to the latest git master version and am running into the following compiler error (gcc 4.8.4, Ubuntu 14.04):\r\n\r\ngcc -I. -I. -I./tgl -g -O2  -I/usr/local/include -I/usr/include -I/usr/include -I/usr/include/lua5.2 -I/usr/include/python3.4m   -DHAVE_CONFIG_H -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC -c -MP -MD -MF dep/loop.d -MQ objs/loop.o -o objs/loop.o loop.c\r\n\r\nloop.c: In function ‘one_string_read_end’:\r\nloop.c:138:3: error: implicit declaration of function ‘tfree_str’ [-Werror=implicit-function-declaration]\r\n   tfree_str (one_string_prompt);\r\n   ^\r\nloop.c:142:3: error: implicit declaration of function ‘tstrdup’ [-Werror=implicit-function-declaration]\r\n   one_string_results[one_string_num] = tstrdup (one_string);\r\n   ^\r\nloop.c:142:38: error: assignment makes pointer from integer without a cast [-Werror]\r\n   one_string_results[one_string_num] = tstrdup (one_string);\r\n                                      ^\r\n\r\nloop.c: At top level:\r\nloop.c:156:43: error: parameter 1 (‘type’) has incomplete type\r\n void generate_prompt (enum tgl_value_type type, int num) {\r\n                                           ^\r\nloop.c: In function ‘generate_prompt’:\r\nloop.c:158:8: error: ‘tgl_phone_number’ undeclared (first use in this function)\r\n   case tgl_phone_number:\r\n        ^\r\nloop.c:158:8: note: each undeclared identifier is reported only once for each function it appears in\r\nloop.c:160:23: error: assignment makes pointer from integer without a cast [-Werror]\r\n     one_string_prompt = tstrdup (\"phone number: \");\r\n                       ^\r\nloop.c:163:8: error: ‘tgl_code’ undeclared (first use in this function)\r\n   case tgl_code:\r\n        ^\r\nloop.c:165:23: error: assignment makes pointer from integer without a cast [-Werror]\r\n     one_string_prompt = tstrdup (\"code ('CALL' for phone code): \");\r\n                       ^\r\nloop.c:168:8: error: ‘tgl_register_info’ undeclared (first use in this function)\r\n   case tgl_register_info:\r\n        ^\r\nloop.c:172:25: error: assignment makes pointer from integer without a cast [-Werror]\r\n       one_string_prompt = tstrdup (\"register (Y/n): \");\r\n                         ^\r\nloop.c:175:25: error: assignment makes pointer from integer without a cast [-Werror]\r\n       one_string_prompt = tstrdup (\"first name: \");\r\n                         ^\r\nloop.c:178:25: error: assignment makes pointer from integer without a cast [-Werror]\r\n       one_string_prompt = tstrdup (\"last name: \");\r\n                         ^\r\nloop.c:184:8: error: ‘tgl_new_password’ undeclared (first use in this function)\r\n   case tgl_new_password:\r\n        ^\r\nloop.c:188:25: error: assignment makes pointer from integer without a cast [-Werror]\r\n       one_string_prompt = tstrdup (\"new password: \");\r\n                         ^\r\nloop.c:191:25: error: assignment makes pointer from integer without a cast [-Werror]\r\n       one_string_prompt = tstrdup (\"retype new password: \");\r\n                         ^\r\nloop.c:197:8: error: ‘tgl_cur_and_new_password’ undeclared (first use in this function)\r\n   case tgl_cur_and_new_password:\r\n        ^\r\nloop.c:201:25: error: assignment makes pointer from integer without a cast [-Werror]\r\n       one_string_prompt = tstrdup (\"old password: \");\r\n                         ^\r\nloop.c:204:25: error: assignment makes pointer from integer without a cast [-Werror]\r\n       one_string_prompt = tstrdup (\"new password: \");\r\n\r\nloop.c:207:25: error: assignment makes pointer from integer without a cast [-Werror]\r\n   generate_prompt (one_string_type, one_string_num);  \r\n   ^\r\n     bl_do_dc_option (TLS, 5, \"\", 0, TG_SERVER_5, strlen (TG_SERVER_5), 443);\r\n     ^\r\nIn file included from loop.c:70:0:\r\n./tgl/tgl-binlog.h:28:6: note: expected ‘int’ but argument is of type ‘char *’\r\n void bl_do_dc_option (struct tgl_state *TLS, int id, int l1, const char *name, int l2, const char *ip, int port);\r\n      ^\r\nloop.c:573:5: error: passing argument 6 of ‘bl_do_dc_option’ makes pointer from integer without a cast [-Werror]\r\n     bl_do_dc_option (TLS, 5, \"\", 0, TG_SERVER_5, strlen (TG_SERVER_5), 443);\r\n     ^\r\nIn file included from loop.c:70:0:\r\n./tgl/tgl-binlog.h:28:6: note: expected ‘const char *’ but argument is of type ‘size_t’\r\n void bl_do_dc_option (struct tgl_state *TLS, int id, int l1, const char *name, int l2, const char *ip, int port);\r\n      ^\r\nloop.c: In function ‘read_secret_chat’:\r\nloop.c:651:3: error: implicit declaration of function ‘bl_do_encr_chat_new’ [-Werror=implicit-function-declaration]\r\n   bl_do_encr_chat_new (TLS, id,\r\n   ^\r\nloop.c:666:5: error: ‘TGLECF_CREATE’ undeclared (first use in this function)\r\n     TGLECF_CREATE | TGLECF_CREATED\r\n     ^\r\nloop.c:666:21: error: ‘TGLECF_CREATED’ undeclared (first use in this function)\r\n     TGLECF_CREATE | TGLECF_CREATED\r\n                     ^\r\nloop.c: In function ‘on_started’:\r\nloop.c:769:5: error: passing argument 2 of ‘tgl_do_get_dialog_list’ makes pointer from integer without a cast [-Werror]\r\n     tgl_do_get_dialog_list (TLS, 100, 0, dlist_cb, 0);\r\n     ^\r\nIn file included from python-tg.h:25:0,\r\n                 from loop.c:25:\r\n./tgl/tgl.h:318:6: note: expected ‘void (*)(struct tgl_state *, void *, int,  int,  struct tgl_peer_id_t *, int *, int *)’ but argument is of type ‘int’\r\n void tgl_do_get_dialog_list (struct tgl_state *TLS, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, tgl_peer_id_t peers[], int last_msg_id[], int unread_count[]), void *callback_extra);\r\n      ^\r\nloop.c:769:5: error: too many arguments to function ‘tgl_do_get_dialog_list’\r\n     tgl_do_get_dialog_list (TLS, 100, 0, dlist_cb, 0);\r\n     ^\r\nIn file included from python-tg.h:25:0,\r\n                 from loop.c:25:\r\n./tgl/tgl.h:318:6: note: declared here\r\n void tgl_do_get_dialog_list (struct tgl_state *TLS, void (*callback)(struct tgl_state *TLS, void *callback_extra, int success, int size, tgl_peer_id_t peers[], int last_msg_id[], int unread_count[]), void *callback_extra);\r\n      ^\r\nloop.c: In function ‘loop’:\r\nloop.c:810:5: error: implicit declaration of function ‘tgl_enable_bot’ [-Werror=implicit-function-declaration]\r\n     tgl_enable_bot (TLS);\r\n     ^\r\nloop.c:813:5: error: implicit declaration of function ‘tgl_disable_link_preview’ [-Werror=implicit-function-declaration]\r\n     tgl_disable_link_preview (TLS);\r\n     ^\r\ncc1: all warnings being treated as errors\r\nmake: *** [objs/loop.o] Error 1"}}