diff options
author | midipix <writeonce@midipix.org> | 2016-05-11 11:58:03 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-05-14 07:18:25 -0400 |
commit | c713d8d019f7b0f9ed4a60912f440aca991d43c1 (patch) | |
tree | 949b58b49bc5087768cc8dbc3f65513b022ae5c5 /src | |
parent | a7c8d71acbd60c4b2f3ba63c47eba9c74fa4270d (diff) | |
download | ntapi-c713d8d019f7b0f9ed4a60912f440aca991d43c1.tar.bz2 ntapi-c713d8d019f7b0f9ed4a60912f440aca991d43c1.tar.xz |
code maintenance: mark unused parameters.
Diffstat (limited to 'src')
24 files changed, 82 insertions, 0 deletions
diff --git a/src/argv/ntapi_tt_argv_envp.c b/src/argv/ntapi_tt_argv_envp.c index 939c771..586393e 100644 --- a/src/argv/ntapi_tt_argv_envp.c +++ b/src/argv/ntapi_tt_argv_envp.c @@ -119,6 +119,9 @@ int32_t __stdcall __ntapi_tt_parse_cmd_line_args_utf16( unsigned int islash; unsigned char quoted_state; + /* unused param */ + (void)arg_flags; + /* check parameters for validity and alignment */ if ((!(uintptr_t)cmd_line) || (*cmd_line == 0)) /* we require at least one argument */ @@ -314,6 +317,9 @@ int32_t __stdcall __ntapi_tt_get_argv_envp_utf16( uintptr_t * paligned; wchar16_t * pboundary; + /* unused param */ + (void)reserved; + /* init */ __internals = __ntapi_internals(); diff --git a/src/argv/ntapi_tt_array_utf16.c b/src/argv/ntapi_tt_array_utf16.c index cc2d2f0..a86d5f8 100644 --- a/src/argv/ntapi_tt_array_utf16.c +++ b/src/argv/ntapi_tt_array_utf16.c @@ -37,6 +37,10 @@ int32_t __stdcall __ntapi_tt_array_copy_utf16( ptrdiff_t ptrs; size_t needed; + /* unused params */ + (void)interpreter; + (void)optarg; + /* fallback */ dummy = 0; wargv = wargv ? wargv : &dummy; diff --git a/src/argv/ntapi_tt_array_utf8.c b/src/argv/ntapi_tt_array_utf8.c index 8cea00b..364bceb 100644 --- a/src/argv/ntapi_tt_array_utf8.c +++ b/src/argv/ntapi_tt_array_utf8.c @@ -30,6 +30,10 @@ int32_t __stdcall __ntapi_tt_array_copy_utf8( ptrdiff_t ptrs; size_t needed; + /* unused params */ + (void)interpreter; + (void)optarg; + /* fallback */ dummy = 0; argv = argv ? argv : &dummy; @@ -113,5 +117,12 @@ int32_t __stdcall __ntapi_tt_array_convert_utf8_to_utf16( __in size_t buffer_len, __out size_t * bytes_written) { + (void)arrv; + (void)arra; + (void)base; + (void)buffer; + (void)buffer_len; + (void)bytes_written; + return NT_STATUS_SUCCESS; } diff --git a/src/fs/ntapi_tt_mount.c b/src/fs/ntapi_tt_mount.c index 391e3fb..6b6dce2 100644 --- a/src/fs/ntapi_tt_mount.c +++ b/src/fs/ntapi_tt_mount.c @@ -329,6 +329,8 @@ int32_t __stdcall __ntapi_tt_get_dos_drive_letter_from_device( uint32_t offset; nt_mount_points * mnt_points; + (void)buffer_size; + if (!dev_name) { dev_name = (nt_mount_dev_name *)&dev_name_buffer; status = __ntapi_tt_get_dos_drive_device_name( diff --git a/src/fs/ntapi_tt_open_logical_parent_directory.c b/src/fs/ntapi_tt_open_logical_parent_directory.c index f62b8b5..0f1b7d6 100644 --- a/src/fs/ntapi_tt_open_logical_parent_directory.c +++ b/src/fs/ntapi_tt_open_logical_parent_directory.c @@ -17,5 +17,13 @@ int32_t __stdcall __ntapi_tt_open_logical_parent_directory( __in uint32_t open_options, __out int32_t * type) { + (void)hparent; + (void)hdir; + (void)buffer; + (void)buffer_size; + (void)desired_access; + (void)open_options; + (void)type; + return NT_STATUS_MORE_PROCESSING_REQUIRED; } diff --git a/src/fs/ntapi_tt_open_physical_parent_directory.c b/src/fs/ntapi_tt_open_physical_parent_directory.c index c713962..a9975a7 100644 --- a/src/fs/ntapi_tt_open_physical_parent_directory.c +++ b/src/fs/ntapi_tt_open_physical_parent_directory.c @@ -24,6 +24,8 @@ int32_t __stdcall __ntapi_tt_open_physical_parent_directory( nt_unicode_string * path; uint32_t len; + (void)type; + path = (nt_unicode_string *)buffer; if ((status = __ntapi->zw_query_object( diff --git a/src/hash/ntapi_tt_populate_hashed_import_table.c b/src/hash/ntapi_tt_populate_hashed_import_table.c index 7f760c1..4275297 100644 --- a/src/hash/ntapi_tt_populate_hashed_import_table.c +++ b/src/hash/ntapi_tt_populate_hashed_import_table.c @@ -30,6 +30,10 @@ static int __process_exported_symbol( ntapi_hashed_symbol * hashed_symbol; uintptr_t * fnptr; + /* unused params */ + (void)base; + (void)exp_hdr; + /* binary search variables */ uint32_t lower; uint32_t upper; diff --git a/src/internal/ntapi.c b/src/internal/ntapi.c index e8173ce..d201eeb 100644 --- a/src/internal/ntapi.c +++ b/src/internal/ntapi.c @@ -391,6 +391,7 @@ static int32_t __fastcall __ntapi_init_once(ntapi_vtbl ** pvtbl) static int32_t __fastcall __ntapi_init_pending(ntapi_vtbl ** pvtbl) { + (void)pvtbl; return NT_STATUS_PENDING; } diff --git a/src/internal/ntapi_entry_point.c b/src/internal/ntapi_entry_point.c index 6ea5724..7d0f99f 100644 --- a/src/internal/ntapi_entry_point.c +++ b/src/internal/ntapi_entry_point.c @@ -8,5 +8,9 @@ int __stdcall __ntapi_entry_point(void * hinstance, uint32_t reason, void * reserved) { + (void)hinstance; + (void)reason; + (void)reserved; + return 1; } diff --git a/src/ipc/ntapi_tt_create_pipe_v1.c b/src/ipc/ntapi_tt_create_pipe_v1.c index a22e839..98a23fa 100644 --- a/src/ipc/ntapi_tt_create_pipe_v1.c +++ b/src/ipc/ntapi_tt_create_pipe_v1.c @@ -59,6 +59,8 @@ int32_t __stdcall __ntapi_ipc_create_pipe_v1( 0 }; + (void)advisory_buffer_size; + /* pipe_count */ counter = (intptr_t *)&__ntapi_internals()->v1_pipe_counter; at_locked_inc(counter); diff --git a/src/ipc/ntapi_tt_create_pipe_v2.c b/src/ipc/ntapi_tt_create_pipe_v2.c index 0fed719..7252bf4 100644 --- a/src/ipc/ntapi_tt_create_pipe_v2.c +++ b/src/ipc/ntapi_tt_create_pipe_v2.c @@ -33,6 +33,8 @@ int32_t __stdcall __ntapi_ipc_create_pipe_v2( '\\','N','a','m','e','d','P','i','p','e','\\',0 }; + (void)advisory_buffer_size; + /* nt_name: pipe device directory */ nt_name.strlen = (uint16_t)(sizeof(pipe_dir) - sizeof(wchar16_t)); nt_name.maxlen = 0; diff --git a/src/ldr/ntapi_ldr_load_system_dll.c b/src/ldr/ntapi_ldr_load_system_dll.c index 1bd2bbc..a5c56f6 100644 --- a/src/ldr/ntapi_ldr_load_system_dll.c +++ b/src/ldr/ntapi_ldr_load_system_dll.c @@ -20,6 +20,8 @@ int32_t __stdcall __ntapi_ldr_load_system_dll( nt_unicode_string nt_image_name; uintptr_t buffer[0x80]; + (void)image_flags; + /* stack buffer */ __ntapi->tt_aligned_block_memset(buffer,0,sizeof(buffer)); diff --git a/src/process/ntapi_tt_create_remote_process_params.c b/src/process/ntapi_tt_create_remote_process_params.c index 3c5f37b..e726974 100644 --- a/src/process/ntapi_tt_create_remote_process_params.c +++ b/src/process/ntapi_tt_create_remote_process_params.c @@ -56,6 +56,11 @@ int32_t __stdcall __ntapi_tt_create_remote_process_params( nt_process_parameters * rparams_block; nt_process_parameters * params_default; + /* unused params */ + (void)window_title; + (void)desktop_info; + (void)shell_info; + /* make the compiler happy */ d_image = 0; d_dll_path = 0; diff --git a/src/pty/ntapi_pty_ioctl.c b/src/pty/ntapi_pty_ioctl.c index 06656ee..5083ce1 100644 --- a/src/pty/ntapi_pty_ioctl.c +++ b/src/pty/ntapi_pty_ioctl.c @@ -29,6 +29,10 @@ int32_t __stdcall __ntapi_pty_ioctl( nt_tty_sigctl_info * input; nt_tty_sigctl_info * output; + (void)hevent; + (void)apc_routine; + (void)apc_context; + if ((uintptr_t)input_buffer % sizeof(uintptr_t)) return NT_STATUS_DATATYPE_MISALIGNMENT_ERROR; else if (input_buffer_length != sizeof(nt_tty_sigctl_info)) diff --git a/src/socket/ntapi_sc_accept.c b/src/socket/ntapi_sc_accept.c index fa61603..3390616 100644 --- a/src/socket/ntapi_sc_accept.c +++ b/src/socket/ntapi_sc_accept.c @@ -34,6 +34,9 @@ int32_t __cdecl __ntapi_sc_accept( _addr_memcpy * src; _addr_memcpy * dst; + (void)afdflags; + (void)tdiflags; + iosb = iosb ? iosb : &siosb; /* establish kernel connection */ diff --git a/src/socket/ntapi_sc_bind_v1.c b/src/socket/ntapi_sc_bind_v1.c index e0bfc6a..bf07a60 100644 --- a/src/socket/ntapi_sc_bind_v1.c +++ b/src/socket/ntapi_sc_bind_v1.c @@ -46,6 +46,8 @@ int32_t __cdecl __ntapi_sc_bind_v1( _addr_memcpy * src; _addr_memcpy * dst; + (void)addrlen; + iosb = iosb ? iosb : &siosb; /* service_flags */ diff --git a/src/socket/ntapi_sc_bind_v2.c b/src/socket/ntapi_sc_bind_v2.c index 36ea98f..92d14b6 100644 --- a/src/socket/ntapi_sc_bind_v2.c +++ b/src/socket/ntapi_sc_bind_v2.c @@ -43,6 +43,9 @@ int32_t __cdecl __ntapi_sc_bind_v2( _addr_memcpy * src; _addr_memcpy * dst; + (void)addrlen; + (void)service_flags; + iosb = iosb ? iosb : &siosb; /* request */ diff --git a/src/socket/ntapi_sc_connect_v1.c b/src/socket/ntapi_sc_connect_v1.c index ef7f31b..4dcd3c1 100644 --- a/src/socket/ntapi_sc_connect_v1.c +++ b/src/socket/ntapi_sc_connect_v1.c @@ -47,6 +47,8 @@ int32_t __cdecl __ntapi_sc_connect_v1( _addr_memcpy * src; _addr_memcpy * dst; + (void)addrlen; + iosb = iosb ? iosb : &siosb; /* service_flags */ diff --git a/src/socket/ntapi_sc_connect_v2.c b/src/socket/ntapi_sc_connect_v2.c index 5d839f2..42fd213 100644 --- a/src/socket/ntapi_sc_connect_v2.c +++ b/src/socket/ntapi_sc_connect_v2.c @@ -38,6 +38,8 @@ int32_t __cdecl __ntapi_sc_connect_v2( _addr_memcpy * src; _addr_memcpy * dst; + (void)service_flags; + if ((addrlen != sizeof(nt_sockaddr_in4)) && (addrlen != sizeof(nt_sockaddr_in6))) return NT_STATUS_INVALID_PARAMETER_3; diff --git a/src/socket/ntapi_sc_wait.c b/src/socket/ntapi_sc_wait.c index d6e7210..64d74cb 100644 --- a/src/socket/ntapi_sc_wait.c +++ b/src/socket/ntapi_sc_wait.c @@ -14,6 +14,8 @@ int32_t __cdecl __ntapi_sc_wait(nt_socket * hssocket, nt_iosb * iosb, nt_timeout { nt_iosb cancel; + (void)iosb; + timeout = (timeout && timeout->quad) ? timeout : 0; diff --git a/src/tty/ntapi_tty_client_process_register.c b/src/tty/ntapi_tty_client_process_register.c index 6a010f1..3817712 100644 --- a/src/tty/ntapi_tty_client_process_register.c +++ b/src/tty/ntapi_tty_client_process_register.c @@ -18,6 +18,8 @@ int32_t __stdcall __ntapi_tty_client_process_register( nt_status status; nt_tty_register_msg msg; + (void)reserved; + __ntapi->tt_aligned_block_memset( &msg,0,sizeof(msg)); diff --git a/src/unicode/ntapi_uc_unicode_conversion_from_utf16.c b/src/unicode/ntapi_uc_unicode_conversion_from_utf16.c index 74ced6e..bbb12d2 100644 --- a/src/unicode/ntapi_uc_unicode_conversion_from_utf16.c +++ b/src/unicode/ntapi_uc_unicode_conversion_from_utf16.c @@ -283,5 +283,6 @@ int32_t __stdcall __ntapi_uc_convert_unicode_stream_utf16_to_utf8( int32_t __stdcall __ntapi_uc_convert_unicode_stream_utf16_to_utf32( __in_out nt_unicode_conversion_params_utf16_to_utf32 * params) { + (void)params; return NT_STATUS_SUCCESS; } diff --git a/src/unicode/ntapi_uc_unicode_conversion_from_utf8.c b/src/unicode/ntapi_uc_unicode_conversion_from_utf8.c index ac34308..1ec6eb0 100644 --- a/src/unicode/ntapi_uc_unicode_conversion_from_utf8.c +++ b/src/unicode/ntapi_uc_unicode_conversion_from_utf8.c @@ -284,5 +284,6 @@ int32_t __stdcall __ntapi_uc_convert_unicode_stream_utf8_to_utf16( int32_t __stdcall __ntapi_uc_convert_unicode_stream_utf8_to_utf32( __in_out nt_unicode_conversion_params_utf8_to_utf32 * params) { + (void)params; return NT_STATUS_SUCCESS; } diff --git a/src/vmount/ntapi_vms_cache.c b/src/vmount/ntapi_vms_cache.c index 31c09a4..c97ff04 100644 --- a/src/vmount/ntapi_vms_cache.c +++ b/src/vmount/ntapi_vms_cache.c @@ -64,6 +64,10 @@ nt_vms_cache __stdcall __ntapi_vms_cache_alloc( size_t buffer_size; nt_vms_cache_context * vms_cache; + /* unused params */ + (void)flags; + (void)options; + /* status */ if (!status) status = &_status; @@ -185,6 +189,9 @@ int32_t __stdcall __ntapi_vms_cache_record_remove( int32_t status; struct dalist_node_ex * node; + (void)dev_name_hash; + (void)index_number; + status = dalist_get_node_by_key( &cache->cache, &node, |