diff --git a/server/fd.c b/server/fd.c index 389c6a749f5..f2f8e9b2f95 100644 --- a/server/fd.c +++ b/server/fd.c @@ -1026,7 +1026,7 @@ static int set_unix_lock( struct fd *fd, file_pos_t start, file_pos_t end, int t } /* check if interval [start;end) overlaps the lock */ -inline static int lock_overlaps( struct file_lock *lock, file_pos_t start, file_pos_t end ) +static inline int lock_overlaps( struct file_lock *lock, file_pos_t start, file_pos_t end ) { if (lock->end && start >= lock->end) return 0; if (end && lock->start >= end) return 0; diff --git a/server/file.h b/server/file.h index 836d438a088..85af8944714 100644 --- a/server/file.h +++ b/server/file.h @@ -79,7 +79,7 @@ extern void no_cancel_async( struct fd *fd ); extern void main_loop(void); extern void remove_process_locks( struct process *process ); -inline static struct fd *get_obj_fd( struct object *obj ) { return obj->ops->get_fd( obj ); } +static inline struct fd *get_obj_fd( struct object *obj ) { return obj->ops->get_fd( obj ); } /* timeout functions */ diff --git a/server/handle.c b/server/handle.c index 852b3f514f1..9fc8b609e5b 100644 --- a/server/handle.c +++ b/server/handle.c @@ -69,11 +69,11 @@ static struct handle_table *global_table; /* handle to table index conversion */ /* handles are a multiple of 4 under NT; handle 0 is not used */ -inline static obj_handle_t index_to_handle( int index ) +static inline obj_handle_t index_to_handle( int index ) { return (obj_handle_t)((unsigned long)(index + 1) << 2); } -inline static int handle_to_index( obj_handle_t handle ) +static inline int handle_to_index( obj_handle_t handle ) { return ((unsigned long)handle >> 2) - 1; } @@ -82,16 +82,16 @@ inline static int handle_to_index( obj_handle_t handle ) #define HANDLE_OBFUSCATOR 0x544a4def -inline static int handle_is_global( obj_handle_t handle) +static inline int handle_is_global( obj_handle_t handle) { return ((unsigned long)handle ^ HANDLE_OBFUSCATOR) < 0x10000; } -inline static obj_handle_t handle_local_to_global( obj_handle_t handle ) +static inline obj_handle_t handle_local_to_global( obj_handle_t handle ) { if (!handle) return 0; return (obj_handle_t)((unsigned long)handle ^ HANDLE_OBFUSCATOR); } -inline static obj_handle_t handle_global_to_local( obj_handle_t handle ) +static inline obj_handle_t handle_global_to_local( obj_handle_t handle ) { return (obj_handle_t)((unsigned long)handle ^ HANDLE_OBFUSCATOR); } diff --git a/server/hook.c b/server/hook.c index 8e0a797eca5..6137b581904 100644 --- a/server/hook.c +++ b/server/hook.c @@ -180,14 +180,14 @@ static struct hook *find_hook( struct thread *thread, int index, void *proc ) } /* get the first hook in the chain */ -inline static struct hook *get_first_hook( struct hook_table *table, int index ) +static inline struct hook *get_first_hook( struct hook_table *table, int index ) { struct list *elem = list_head( &table->hooks[index] ); return elem ? HOOK_ENTRY( elem ) : NULL; } /* check if a given hook should run in the current thread */ -inline static int run_hook_in_current_thread( struct hook *hook ) +static inline int run_hook_in_current_thread( struct hook *hook ) { if ((!hook->process || hook->process == current->process) && (!(hook->flags & WINEVENT_SKIPOWNPROCESS) || hook->process != current->process)) @@ -200,7 +200,7 @@ inline static int run_hook_in_current_thread( struct hook *hook ) } /* check if a given hook should run in the owner thread instead of the current thread */ -inline static int run_hook_in_owner_thread( struct hook *hook ) +static inline int run_hook_in_owner_thread( struct hook *hook ) { if ((hook->index == WH_MOUSE_LL - WH_MINHOOK || hook->index == WH_KEYBOARD_LL - WH_MINHOOK)) @@ -209,7 +209,7 @@ inline static int run_hook_in_owner_thread( struct hook *hook ) } /* find the first non-deleted hook in the chain */ -inline static struct hook *get_first_valid_hook( struct hook_table *table, int index, +static inline struct hook *get_first_valid_hook( struct hook_table *table, int index, int event, user_handle_t win, int object_id, int child_id ) { diff --git a/server/mapping.c b/server/mapping.c index 9b123e2cbcb..566f6dc1ea8 100644 --- a/server/mapping.c +++ b/server/mapping.c @@ -266,7 +266,7 @@ static int get_image_params( struct mapping *mapping ) } /* get the size of the unix file associated with the mapping */ -inline static int get_file_size( struct file *file, file_pos_t *size ) +static inline int get_file_size( struct file *file, file_pos_t *size ) { struct stat st; int unix_fd = get_file_unix_fd( file ); diff --git a/server/process.h b/server/process.h index 6f392406ffc..206d51cd749 100644 --- a/server/process.h +++ b/server/process.h @@ -145,14 +145,14 @@ extern void finish_process_tracing( struct process *process ); extern int read_process_memory( struct process *process, const void *ptr, data_size_t size, char *dest ); extern int write_process_memory( struct process *process, void *ptr, data_size_t size, const char *src ); -inline static process_id_t get_process_id( struct process *process ) { return process->id; } +static inline process_id_t get_process_id( struct process *process ) { return process->id; } -inline static int is_process_init_done( struct process *process ) +static inline int is_process_init_done( struct process *process ) { return process->startup_state == STARTUP_DONE; } -inline static struct process_dll *get_process_exe_module( struct process *process ) +static inline struct process_dll *get_process_exe_module( struct process *process ) { struct list *ptr = list_head( &process->dlls ); return ptr ? LIST_ENTRY( ptr, struct process_dll, entry ) : NULL; diff --git a/server/ptrace.c b/server/ptrace.c index 14a29f52cac..99cb910c2ea 100644 --- a/server/ptrace.c +++ b/server/ptrace.c @@ -86,7 +86,7 @@ #define PT_READ_D 3 #define PT_WRITE_D 4 #define PT_STEP 5 -inline static int ptrace(int req, ...) { errno = EPERM; return -1; /*FAIL*/ } +static inline int ptrace(int req, ...) { errno = EPERM; return -1; /*FAIL*/ } #endif /* HAVE_SYS_PTRACE_H */ /* handle a status returned by wait4 */ diff --git a/server/queue.c b/server/queue.c index 7efdd78f03f..a9d8448f631 100644 --- a/server/queue.c +++ b/server/queue.c @@ -306,13 +306,13 @@ void set_queue_hooks( struct thread *thread, struct hook_table *hooks ) } /* check the queue status */ -inline static int is_signaled( struct msg_queue *queue ) +static inline int is_signaled( struct msg_queue *queue ) { return ((queue->wake_bits & queue->wake_mask) || (queue->changed_bits & queue->changed_mask)); } /* set some queue bits */ -inline static void set_queue_bits( struct msg_queue *queue, unsigned int bits ) +static inline void set_queue_bits( struct msg_queue *queue, unsigned int bits ) { queue->wake_bits |= bits; queue->changed_bits |= bits; @@ -320,26 +320,26 @@ inline static void set_queue_bits( struct msg_queue *queue, unsigned int bits ) } /* clear some queue bits */ -inline static void clear_queue_bits( struct msg_queue *queue, unsigned int bits ) +static inline void clear_queue_bits( struct msg_queue *queue, unsigned int bits ) { queue->wake_bits &= ~bits; queue->changed_bits &= ~bits; } /* check whether msg is a keyboard message */ -inline static int is_keyboard_msg( struct message *msg ) +static inline int is_keyboard_msg( struct message *msg ) { return (msg->msg >= WM_KEYFIRST && msg->msg <= WM_KEYLAST); } /* check if message is matched by the filter */ -inline static int check_msg_filter( unsigned int msg, unsigned int first, unsigned int last ) +static inline int check_msg_filter( unsigned int msg, unsigned int first, unsigned int last ) { return (msg >= first && msg <= last); } /* check whether a message filter contains at least one potential hardware message */ -inline static int filter_contains_hw_range( unsigned int first, unsigned int last ) +static inline int filter_contains_hw_range( unsigned int first, unsigned int last ) { /* hardware message ranges are (in numerical order): * WM_NCMOUSEFIRST .. WM_NCMOUSELAST @@ -354,7 +354,7 @@ inline static int filter_contains_hw_range( unsigned int first, unsigned int las } /* get the QS_* bit corresponding to a given hardware message */ -inline static int get_hardware_msg_bit( struct message *msg ) +static inline int get_hardware_msg_bit( struct message *msg ) { if (msg->msg == WM_MOUSEMOVE || msg->msg == WM_NCMOUSEMOVE) return QS_MOUSEMOVE; if (is_keyboard_msg( msg )) return QS_KEY; @@ -362,7 +362,7 @@ inline static int get_hardware_msg_bit( struct message *msg ) } /* get the current thread queue, creating it if needed */ -inline static struct msg_queue *get_current_queue(void) +static inline struct msg_queue *get_current_queue(void) { struct msg_queue *queue = current->queue; if (!queue) queue = create_msg_queue( current, NULL ); @@ -370,7 +370,7 @@ inline static struct msg_queue *get_current_queue(void) } /* get a (pseudo-)unique id to tag hardware messages */ -inline static unsigned int get_unique_id(void) +static inline unsigned int get_unique_id(void) { static unsigned int id; if (!++id) id = 1; /* avoid an id of 0 */ @@ -860,7 +860,7 @@ static void thread_input_destroy( struct object *obj ) } /* fix the thread input data when a window is destroyed */ -inline static void thread_input_cleanup_window( struct msg_queue *queue, user_handle_t window ) +static inline void thread_input_cleanup_window( struct msg_queue *queue, user_handle_t window ) { struct thread_input *input = queue->input; diff --git a/server/registry.c b/server/registry.c index 531bf97974e..d27d51c0e74 100644 --- a/server/registry.c +++ b/server/registry.c @@ -350,7 +350,7 @@ static void key_destroy( struct object *obj ) } /* get the request vararg as registry path */ -inline static void get_req_path( struct unicode_str *str, int skip_root ) +static inline void get_req_path( struct unicode_str *str, int skip_root ) { static const WCHAR root_name[] = { '\\','R','e','g','i','s','t','r','y','\\' }; diff --git a/server/request.h b/server/request.h index 44bab110071..3f7f4b65865 100644 --- a/server/request.h +++ b/server/request.h @@ -66,32 +66,32 @@ extern void trace_request(void); extern void trace_reply( enum request req, const union generic_reply *reply ); /* get the request vararg data */ -inline static const void *get_req_data(void) +static inline const void *get_req_data(void) { return current->req_data; } /* get the request vararg size */ -inline static data_size_t get_req_data_size(void) +static inline data_size_t get_req_data_size(void) { return current->req.request_header.request_size; } /* get the request vararg as unicode string */ -inline static void get_req_unicode_str( struct unicode_str *str ) +static inline void get_req_unicode_str( struct unicode_str *str ) { str->str = get_req_data(); str->len = (get_req_data_size() / sizeof(WCHAR)) * sizeof(WCHAR); } /* get the reply maximum vararg size */ -inline static data_size_t get_reply_max_size(void) +static inline data_size_t get_reply_max_size(void) { return current->req.request_header.reply_size; } /* allocate and fill the reply data */ -inline static void *set_reply_data( const void *data, data_size_t size ) +static inline void *set_reply_data( const void *data, data_size_t size ) { void *ret = set_reply_data_size( size ); if (ret) memcpy( ret, data, size ); @@ -99,7 +99,7 @@ inline static void *set_reply_data( const void *data, data_size_t size ) } /* set the reply data pointer directly (will be freed by request code) */ -inline static void set_reply_data_ptr( void *data, data_size_t size ) +static inline void set_reply_data_ptr( void *data, data_size_t size ) { assert( size <= get_reply_max_size() ); current->reply_size = size; diff --git a/server/sock.c b/server/sock.c index 7c96f5fb573..58301904760 100644 --- a/server/sock.c +++ b/server/sock.c @@ -284,7 +284,7 @@ static void sock_wake_up( struct sock *sock, int pollev ) } } -inline static int sock_error( struct fd *fd ) +static inline int sock_error( struct fd *fd ) { unsigned int optval = 0, optlen; diff --git a/server/thread.c b/server/thread.c index 030ee204a7c..7010a4d190d 100644 --- a/server/thread.c +++ b/server/thread.c @@ -136,7 +136,7 @@ static const struct fd_ops thread_fd_ops = static struct list thread_list = LIST_INIT(thread_list); /* initialize the structure for a newly allocated thread */ -inline static void init_thread_structure( struct thread *thread ) +static inline void init_thread_structure( struct thread *thread ) { int i; diff --git a/server/trace.c b/server/trace.c index 01c873fbad8..8475466a0a5 100644 --- a/server/trace.c +++ b/server/trace.c @@ -47,7 +47,7 @@ static const char *get_status_name( unsigned int status ); /* utility functions */ -inline static void remove_data( data_size_t size ) +static inline void remove_data( data_size_t size ) { cur_data = (const char *)cur_data + size; cur_size -= size; diff --git a/server/user.c b/server/user.c index 716ca5838cb..489a99e5ffb 100644 --- a/server/user.c +++ b/server/user.c @@ -45,13 +45,13 @@ static struct user_handle *handle_to_entry( user_handle_t handle ) return NULL; } -inline static user_handle_t entry_to_handle( struct user_handle *ptr ) +static inline user_handle_t entry_to_handle( struct user_handle *ptr ) { int index = ptr - handles; return (user_handle_t)((((unsigned long)index << 1) + FIRST_USER_HANDLE) + (ptr->generation << 16)); } -inline static struct user_handle *alloc_user_entry(void) +static inline struct user_handle *alloc_user_entry(void) { struct user_handle *handle; @@ -78,7 +78,7 @@ inline static struct user_handle *alloc_user_entry(void) return handle; } -inline static void *free_user_entry( struct user_handle *ptr ) +static inline void *free_user_entry( struct user_handle *ptr ) { void *ret; ret = ptr->ptr; diff --git a/server/window.c b/server/window.c index 03ed61e2124..cbb4296b361 100644 --- a/server/window.c +++ b/server/window.c @@ -107,7 +107,7 @@ static struct window *progman_window; static struct window *taskman_window; /* retrieve a pointer to a window from its handle */ -inline static struct window *get_window( user_handle_t handle ) +static inline struct window *get_window( user_handle_t handle ) { struct window *ret = get_user_object( handle, USER_WINDOW ); if (!ret) set_win32_error( ERROR_INVALID_WINDOW_HANDLE ); @@ -285,7 +285,7 @@ static obj_handle_t get_property( struct window *win, atom_t atom ) } /* destroy all properties of a window */ -inline static void destroy_properties( struct window *win ) +static inline void destroy_properties( struct window *win ) { int i; diff --git a/server/winstation.c b/server/winstation.c index a7df50e8757..5d2418d232b 100644 --- a/server/winstation.c +++ b/server/winstation.c @@ -186,7 +186,7 @@ static WCHAR *build_desktop_name( const struct unicode_str *name, } /* retrieve a pointer to a desktop object */ -inline static struct desktop *get_desktop_obj( struct process *process, obj_handle_t handle, +static inline struct desktop *get_desktop_obj( struct process *process, obj_handle_t handle, unsigned int access ) { return (struct desktop *)get_handle_obj( process, handle, access, &desktop_ops );