mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	Annotate unused parameters on inline definitions as such
* libspl: umem: These are obviously and intentionally unused; annotate them as such to appease -Wunused-parameter builds that include this header. * sys/dmu.h: In this case, clear_on_evict_dbufp is only used for ZFS_DEBUG builds, so annotate it as __maybe_unused to appease -Wunused-parameter. Reviewed-By: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Kyle Evans <kevans@FreeBSD.org> Closes #10606
This commit is contained in:
		
							parent
							
								
									f7a68f99d0
								
							
						
					
					
						commit
						bfafe1780a
					
				| @ -669,7 +669,8 @@ typedef struct dmu_buf_user { | ||||
| /*ARGSUSED*/ | ||||
| static inline void | ||||
| dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func_sync, | ||||
|     dmu_buf_evict_func_t *evict_func_async, dmu_buf_t **clear_on_evict_dbufp) | ||||
|     dmu_buf_evict_func_t *evict_func_async, | ||||
|     dmu_buf_t **clear_on_evict_dbufp __maybe_unused) | ||||
| { | ||||
| 	ASSERT(dbu->dbu_evict_func_sync == NULL); | ||||
| 	ASSERT(dbu->dbu_evict_func_async == NULL); | ||||
|  | ||||
| @ -36,6 +36,7 @@ | ||||
|  * | ||||
|  * https://labs.omniti.com/trac/portableumem
 | ||||
|  */ | ||||
| #include <sys/debug.h> | ||||
| 
 | ||||
| #include <stdlib.h> | ||||
| #include <stdio.h> | ||||
| @ -131,13 +132,13 @@ umem_zalloc(size_t size, int flags) | ||||
| } | ||||
| 
 | ||||
| static inline void | ||||
| umem_free(void *ptr, size_t size) | ||||
| umem_free(void *ptr, size_t size __maybe_unused) | ||||
| { | ||||
| 	free(ptr); | ||||
| } | ||||
| 
 | ||||
| static inline void | ||||
| umem_nofail_callback(umem_nofail_callback_t *cb) | ||||
| umem_nofail_callback(umem_nofail_callback_t *cb __maybe_unused) | ||||
| {} | ||||
| 
 | ||||
| static inline umem_cache_t * | ||||
| @ -199,7 +200,7 @@ umem_cache_free(umem_cache_t *cp, void *ptr) | ||||
| } | ||||
| 
 | ||||
| static inline void | ||||
| umem_cache_reap_now(umem_cache_t *cp) | ||||
| umem_cache_reap_now(umem_cache_t *cp __maybe_unused) | ||||
| { | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Kyle Evans
						Kyle Evans