本文整理汇总了C++中FOUNDATION_UNUSED函数的典型用法代码示例。如果您正苦于以下问题:C++ FOUNDATION_UNUSED函数的具体用法?C++ FOUNDATION_UNUSED怎么用?C++ FOUNDATION_UNUSED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FOUNDATION_UNUSED函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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);
}
示例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);
}
示例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
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
示例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
}
示例11: main_run
int main_run( void* main_arg )
{
FOUNDATION_UNUSED( main_arg );
log_set_suppress( HASH_TEST, ERRORLEVEL_DEBUG );
return test_run_all();
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}