本文整理汇总了C++中FOUNDATION_UNUSED函数的典型用法代码示例。如果您正苦于以下问题:C++ FOUNDATION_UNUSED函数的具体用法?C++ FOUNDATION_UNUSED怎么用?C++ FOUNDATION_UNUSED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FOUNDATION_UNUSED函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: _socket_stream_truncate
static void
_socket_stream_truncate(stream_t* stream, size_t size) {
FOUNDATION_ASSERT(stream);
FOUNDATION_ASSERT(stream->type == STREAMTYPE_SOCKET);
FOUNDATION_UNUSED(stream);
FOUNDATION_UNUSED(size);
}
开发者ID:rampantpixels,项目名称:network_lib,代码行数:7,代码来源:stream.c
示例2: test_exception_handler
void
test_exception_handler(const char* dump_file, size_t length) {
FOUNDATION_UNUSED(dump_file);
FOUNDATION_UNUSED(length);
log_error(HASH_TEST, ERROR_EXCEPTION, STRING_CONST("Test raised exception"));
process_exit(-1);
}
开发者ID:rampantpixels,项目名称:task_lib,代码行数:7,代码来源:main.c
示例3: blast_reader_unmap
void
blast_reader_unmap(blast_reader_t* reader, void* buffer, uint64_t offset, int size) {
FOUNDATION_UNUSED(reader);
FOUNDATION_UNUSED(buffer);
FOUNDATION_UNUSED(offset);
FOUNDATION_UNUSED(size);
}
开发者ID:harish-agr,项目名称:network_lib,代码行数:7,代码来源:reader.c
示例4: test_log_handler
static void
test_log_handler(hash_t context, error_level_t severity, const char* msg, size_t length) {
FOUNDATION_UNUSED(context);
FOUNDATION_UNUSED(severity);
if (_test_should_terminate)
return;
#if FOUNDATION_PLATFORM_IOS
test_text_view_append(delegate_uiwindow(), 1 , msg, length);
#elif FOUNDATION_PLATFORM_ANDROID
jclass _test_log_class = 0;
jmethodID _test_log_append = 0;
const struct JNINativeInterface** jnienv = thread_attach_jvm();
_test_log_class = (*jnienv)->GetObjectClass(jnienv, android_app()->activity->clazz);
if (_test_log_class)
_test_log_append = (*jnienv)->GetMethodID(jnienv, _test_log_class, "appendLog",
"(Ljava/lang/String;)V");
if (_test_log_append) {
jstring jstr = (*jnienv)->NewStringUTF(jnienv, msg);
(*jnienv)->CallVoidMethod(jnienv, android_app()->activity->clazz, _test_log_append, jstr);
(*jnienv)->DeleteLocalRef(jnienv, jstr);
}
thread_detach_jvm();
FOUNDATION_UNUSED(length);
#endif
}
开发者ID:rampantpixels,项目名称:task_lib,代码行数:27,代码来源:main.c
示例5: _stream_open_stdin
static stream_t*
_stream_open_stdin(const char* path, size_t length, unsigned int mode) {
FOUNDATION_UNUSED(path);
FOUNDATION_UNUSED(length);
stream_t* stream = stream_open_stdin();
stream->mode = (mode & STREAM_BINARY) | STREAM_IN;
return stream;
}
开发者ID:haifenghuang,项目名称:foundation_lib,代码行数:8,代码来源:stream.c
示例6: handle_log
static void
handle_log(hash_t context, error_level_t severity, const char* msg, size_t msg_length) {
FOUNDATION_UNUSED(context);
FOUNDATION_UNUSED(severity);
string_copy(handled_log, sizeof(handled_log), msg, msg_length);
if (_global_log_handler)
_global_log_handler(context, severity, msg, msg_length);
}
开发者ID:rampantpixels,项目名称:foundation_lib,代码行数:8,代码来源:main.c
示例7: test_local_exception_handler
static void
test_local_exception_handler(const char* dump_path, size_t length) {
FOUNDATION_UNUSED(dump_path);
#if !BUILD_ENABLE_LOG
FOUNDATION_UNUSED(length);
#endif
log_infof(HASH_TEST, STRING_CONST("Exception handler called: %.*s"), (int)length, dump_path);
_exception_handler_called = true;
}
开发者ID:rampantpixels,项目名称:foundation_lib,代码行数:9,代码来源:main.c
示例8: test_log_handler
static void
test_log_handler(hash_t context, error_level_t severity, const char* msg, size_t length) {
FOUNDATION_UNUSED(context);
FOUNDATION_UNUSED(severity);
if (_test_should_terminate)
return;
if (!log_stdout())
return;
test_log_view_append(msg, length);
}
开发者ID:rampantpixels,项目名称:foundation_lib,代码行数:10,代码来源:main.c
示例9: test_exception_handler
void
test_exception_handler(const char* dump_file, size_t length) {
FOUNDATION_UNUSED(dump_file);
FOUNDATION_UNUSED(length);
log_error(HASH_TEST, ERROR_EXCEPTION, STRING_CONST("Test raised exception"));
#if (FOUNDATION_PLATFORM_IOS || FOUNDATION_PLATFORM_ANDROID) && !BUILD_ENABLE_LOG
test_log_view_append(STRING_CONST("Test raised exception\n"));
thread_sleep(5000);
#endif
process_exit(-1);
}
开发者ID:rampantpixels,项目名称:foundation_lib,代码行数:11,代码来源:main.c
示例10: process_set_verb
void
process_set_verb(process_t* proc, const char* verb, size_t length) {
#if FOUNDATION_PLATFORM_WINDOWS
if (proc->verb.length <= length)
proc->verb = string_resize(proc->verb.str, proc->verb.length,
proc->verb.length ? proc->verb.length + 1 : 0, length + 1, 0);
proc->verb = string_copy(proc->verb.str, length + 1, verb, length);
#else
FOUNDATION_UNUSED(proc);
FOUNDATION_UNUSED(verb);
FOUNDATION_UNUSED(length);
#endif
}
开发者ID:haifenghuang,项目名称:foundation_lib,代码行数:13,代码来源:process.c
示例11: main_run
int main_run( void* main_arg )
{
FOUNDATION_UNUSED( main_arg );
log_set_suppress( HASH_TEST, ERRORLEVEL_DEBUG );
return test_run_all();
}
开发者ID:emoon,项目名称:foundation_lib,代码行数:7,代码来源:test.c
示例12: blast_client_process_ack
static int
blast_client_process_ack(blast_client_t* client, uint32_t* seq, tick_t timestamp) {
int ipend, psize;
int iack, asize;
for (iack = 0, asize = PACKET_ACK_COUNT; iack < asize; ++iack) {
for (ipend = 0, psize = array_size(client->pending); ipend < psize; ++ipend) {
if (client->pending[ipend].seq == seq[iack]) {
array_erase(client->pending, ipend);
break;
}
}
}
FOUNDATION_UNUSED(timestamp);
/*log_infof( HASH_BLAST, "ACK processed, %d pending packets remaining (ack seq %d)", array_size( client->pending ), seq[0] );
if( array_size( client->pending ) )
{
char* buf = 0;
for( ipend = 0, psize = array_size( client->pending ); ipend < psize; ++ipend )
{
buf = string_append( buf, string_from_uint_static( client->pending[ipend].seq, false, 0, 0 ) );
buf = string_append( buf, " " );
}
log_infof( HASH_BLAST, " %s", buf );
string_deallocate( buf );
}*/
return 0;
}
开发者ID:harish-agr,项目名称:network_lib,代码行数:29,代码来源:client.c
示例13: _socket_stream_size
static size_t
_socket_stream_size(stream_t* stream) {
FOUNDATION_ASSERT(stream);
FOUNDATION_ASSERT(stream->type == STREAMTYPE_SOCKET);
FOUNDATION_UNUSED(stream);
return 0;
}
开发者ID:rampantpixels,项目名称:network_lib,代码行数:7,代码来源:stream.c
示例14: test_event_thread
static void* test_event_thread( object_t thread, void* arg )
{
event_block_t* block;
event_t* event = 0;
FOUNDATION_UNUSED( arg );
while( !thread_should_terminate( thread ) )
{
block = event_stream_process( system_event_stream() );
event = 0;
while( ( event = event_next( block, event ) ) )
{
switch( event->id )
{
case FOUNDATIONEVENT_TERMINATE:
log_warn( HASH_TEST, WARNING_SUSPICIOUS, "Terminating test due to event" );
process_exit( -2 );
break;
default:
break;
}
}
thread_sleep( 10 );
}
return 0;
}
开发者ID:emoon,项目名称:foundation_lib,代码行数:29,代码来源:test.c
示例15: window_module_initialize
int
window_module_initialize(const window_config_t config) {
FOUNDATION_UNUSED(config);
if (_window_initialized)
return 0;
if (_window_event_initialize() < 0)
return -1;
_window_initialized = true;
#if FOUNDATION_PLATFORM_MACOS || FOUNDATION_PLATFORM_IOS
_window_class_reference();
#endif
#if FOUNDATION_PLATFORM_IOS
_window_native_initialize();
#endif
#if FOUNDATION_PLATFORM_LINUX
XSetErrorHandler(_x11_error_handler);
#endif
return 0;
}
开发者ID:rampantpixels,项目名称:window_lib,代码行数:25,代码来源:window.c
示例16: raise_abort
static int
raise_abort(void* arg) {
FOUNDATION_UNUSED(arg);
exception_raise_abort();
#if !FOUNDATION_COMPILER_CLANG
return 1;
#endif
}
开发者ID:rampantpixels,项目名称:foundation_lib,代码行数:8,代码来源:main.c
示例17: WinMain
int STDCALL
WinMain(HINSTANCE instance, HINSTANCE previnst, LPSTR cline, int cmd_show) {
int ret;
FOUNDATION_UNUSED(instance);
FOUNDATION_UNUSED(previnst);
FOUNDATION_UNUSED(cline);
FOUNDATION_UNUSED(cmd_show);
if (main_initialize() < 0)
return -1;
SetConsoleCtrlHandler(_main_console_handler, TRUE);
thread_set_main();
foundation_startup();
system_post_event(FOUNDATIONEVENT_START);
#if BUILD_DEBUG
ret = main_run(0);
#else
{
string_t name;
const application_t* app = environment_application();
string_const_t aname = app->short_name;
string_const_t vstr = string_from_version_static(app->version);
name = string_allocate_concat_varg(
aname.length ? aname.str : "unknown", aname.length ? aname.length : 7,
STRING_CONST("-"),
STRING_CONST(vstr));
if (app->dump_callback)
crash_guard_set(app->dump_callback, STRING_ARGS(name));
ret = crash_guard(main_run, 0, app->dump_callback, STRING_ARGS(name));
string_deallocate(name.str);
}
#endif
main_finalize();
return ret;
}
开发者ID:haifenghuang,项目名称:foundation_lib,代码行数:46,代码来源:main.c
示例18: _profile_stream_thread
static void*
_profile_stream_thread(void* arg) {
FOUNDATION_UNUSED(arg);
thread_yield();
while (!thread_try_wait(4)) {
profile_log(STRING_CONST("Thread message"));
profile_begin_block(STRING_CONST("Thread block"));
{
profile_update_block();
profile_begin_block(STRING_CONST("Thread subblock"));
{
profile_log(STRING_CONST("Sub message"));
profile_trylock(STRING_CONST("Trylock"));
profile_lock(STRING_CONST("Trylock"));
profile_wait(STRING_CONST("Wait"));
profile_signal(STRING_CONST("Signal"));
thread_sleep(2);
profile_unlock(STRING_CONST("Trylock"));
profile_log(STRING_CONST("End sub"));
}
profile_end_block();
profile_begin_block(STRING_CONST("Thread second subblock"));
{
profile_update_block();
profile_begin_block(STRING_CONST("Thread subblock"));
{
}
profile_end_block();
}
profile_end_block();
profile_trylock(STRING_CONST("Trylock"));
thread_sleep(1);
profile_lock(STRING_CONST("Trylock"));
thread_sleep(4);
profile_unlock(STRING_CONST("Trylock"));
}
profile_end_block();
atomic_add64(&_profile_generated_blocks, 14);
}
return 0;
}
开发者ID:rampantpixels,项目名称:foundation_lib,代码行数:56,代码来源:main.c
示例19: test_profile_initialize
static int test_profile_initialize( void )
{
profile_set_output( test_profile_output );
_test_profile_buffer = memory_allocate( 0, TEST_PROFILE_BUFFER_SIZE, 0, MEMORY_PERSISTENT );
FOUNDATION_UNUSED( _test_profile_buffer_size );
return 0;
}
开发者ID:emoon,项目名称:foundation_lib,代码行数:10,代码来源:main.c
示例20: _memory_allocate_malloc
static void*
_memory_allocate_malloc(hash_t context, size_t size, unsigned int align, unsigned int hint) {
void* block;
FOUNDATION_UNUSED(context);
align = _memory_get_align(align);
block = _memory_allocate_malloc_raw(size, align, hint);
if (block && (hint & MEMORY_ZERO_INITIALIZED))
memset(block, 0, (size_t)size);
return block;
}
开发者ID:haifenghuang,项目名称:foundation_lib,代码行数:10,代码来源:memory.c
注:本文中的FOUNDATION_UNUSED函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论