{"comment":{"url":"https://api.github.com/repos/yangqiao/rtems/comments/11822484","html_url":"https://github.com/yangqiao/rtems/commit/3ed7e9bde493bdc8e644fcefa285d99255201ada#commitcomment-11822484","id":11822484,"user":{"login":"gedare","id":1657385,"avatar_url":"https://avatars.githubusercontent.com/u/1657385?v=3","gravatar_id":"","url":"https://api.github.com/users/gedare","html_url":"https://github.com/gedare","followers_url":"https://api.github.com/users/gedare/followers","following_url":"https://api.github.com/users/gedare/following{/other_user}","gists_url":"https://api.github.com/users/gedare/gists{/gist_id}","starred_url":"https://api.github.com/users/gedare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gedare/subscriptions","organizations_url":"https://api.github.com/users/gedare/orgs","repos_url":"https://api.github.com/users/gedare/repos","events_url":"https://api.github.com/users/gedare/events{/privacy}","received_events_url":"https://api.github.com/users/gedare/received_events","type":"User","site_admin":false},"position":162,"line":138,"path":"c/src/lib/libbsp/arm/raspberrypi/include/vc.h","commit_id":"3ed7e9bde493bdc8e644fcefa285d99255201ada","created_at":"2015-06-23T18:07:29Z","updated_at":"2015-06-23T18:07:29Z","body":"Avoid the extra \\ at the end here. Also, use the do-while(0) trick to force a compound expression with scoping, e.g.\r\n```C\r\n#define BCM2835_MAILBOX_ALLOCATE_INIT_BUFFER(_buf, _buf_size) \\\r\n  bcm2835_mailbox_buffer *_buf = malloc(_buf_size); \\\r\n  ... \\\r\n} while (0)\r\n```\r\nWithout the trailing semi-colon. On the other hand, this macro could also be made into a function, e.g.\r\n```buf = bcm2835_mailbox_allocate_init_buffer(int size);```\r\n"}}