【发布时间】:2013-04-30 01:15:42
【问题描述】:
我正在浏览一个用于构建 Pebble 表盘的模板(在 cloudpebble.net)并遇到了以下代码:
void handle_minute_tick(AppContextRef ctx, PebbleTickEvent *t) {
(void)t; // NOOP?
(void)ctx; // NOOP?
display_time(t->tick_time);
}
void handle_init(AppContextRef ctx) {
(void)ctx; // NOOP?
window_init(&window, "Big Time watch");
window_stack_push(&window, true);
window_set_background_color(&window, GColorBlack);
resource_init_current_app(&APP_RESOURCES);
// Avoids a blank screen on watch start.
PblTm tick_time;
get_time(&tick_time);
display_time(&tick_time);
}
void handle_deinit(AppContextRef ctx) {
(void)ctx; // NOOP?
for (int i = 0; i < TOTAL_IMAGE_SLOTS; i++) {
unload_digit_image_from_slot(i);
}
}
我指出的这些行有什么用途?
【问题讨论】:
-
我的猜测只是为了避免变量未使用的警告。
标签: c pebble-watch