{"action":"opened","issue":{"url":"https://api.github.com/repos/itheof/42sh-posix/issues/57","repository_url":"https://api.github.com/repos/itheof/42sh-posix","labels_url":"https://api.github.com/repos/itheof/42sh-posix/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/itheof/42sh-posix/issues/57/comments","events_url":"https://api.github.com/repos/itheof/42sh-posix/issues/57/events","html_url":"https://github.com/itheof/42sh-posix/issues/57","id":191752273,"number":57,"title":"assert() & NDEBUG","user":{"login":"tmielcza","id":13508589,"avatar_url":"https://avatars.githubusercontent.com/u/13508589?v=3","gravatar_id":"","url":"https://api.github.com/users/tmielcza","html_url":"https://github.com/tmielcza","followers_url":"https://api.github.com/users/tmielcza/followers","following_url":"https://api.github.com/users/tmielcza/following{/other_user}","gists_url":"https://api.github.com/users/tmielcza/gists{/gist_id}","starred_url":"https://api.github.com/users/tmielcza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmielcza/subscriptions","organizations_url":"https://api.github.com/users/tmielcza/orgs","repos_url":"https://api.github.com/users/tmielcza/repos","events_url":"https://api.github.com/users/tmielcza/events{/privacy}","received_events_url":"https://api.github.com/users/tmielcza/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-25T18:37:28Z","updated_at":"2016-11-25T18:37:28Z","closed_at":null,"body":"Cette macro est bien pratique quand il s'agit de pointer facilement des erreurs de code (acces en dehors des bornes d'un tableau, déréférencement d'un pointeur NULL, etc).\r\nAussi je propose qu'on pense à l'utiliser dans tous les modules bas-niveau qui ont une interface, et d'ajouter le flag -DNDEBUG à la compilation du projet quand le debug n'est pas activé.\r\n\r\nOn peut même mettre des messages avec ce petit trick:\r\n```c\r\nassert((\"Out of bounds\", n < 0 || n >= size));\r\n```\r\nDans ce cas, il faut compiler avec `-Wno-unused-value` pour éviter le warning (puisque la string n'est pas utilisé)."}}
{"actor":{"display_login":"tmielcza"}}