wmifs: Avoid NULL arguments to strdup.
This prevents several compiler warnings such as the following: wmifs.c:422:3: warning: null argument where non-null required (argument 1) [-Wnonnull] left_action = strdup(LEFT_ACTION); ^
This commit is contained in:
		
							parent
							
								
									3b4c28b9bc
								
							
						
					
					
						commit
						2a7a1a215d
					
				
					 1 changed files with 13 additions and 10 deletions
				
			
		| 
						 | 
					@ -223,10 +223,10 @@
 | 
				
			||||||
#define stats_ptr stats.p.FIXME
 | 
					#define stats_ptr stats.p.FIXME
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Fill in the hardcoded actions */
 | 
					/* Fill in and uncomment the hardcoded actions */
 | 
				
			||||||
#define LEFT_ACTION (NULL)
 | 
					/* #define LEFT_ACTION (NULL) */
 | 
				
			||||||
#define MIDDLE_ACTION (NULL)
 | 
					/* #define MIDDLE_ACTION (NULL) */
 | 
				
			||||||
#define RIGHT_ACTION (NULL)
 | 
					/* #define RIGHT_ACTION (NULL) */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Defines voor alle coordinate */
 | 
					/* Defines voor alle coordinate */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -418,12 +418,15 @@ void wmifs_routine(int argc, char **argv)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (LEFT_ACTION)
 | 
					#ifdef LEFT_ACTION
 | 
				
			||||||
	left_action = strdup(LEFT_ACTION);
 | 
						left_action = strdup(LEFT_ACTION);
 | 
				
			||||||
	if (MIDDLE_ACTION)
 | 
					#endif
 | 
				
			||||||
 | 
					#ifdef MIDDLE_ACTION
 | 
				
			||||||
	middle_action = strdup(MIDDLE_ACTION);
 | 
						middle_action = strdup(MIDDLE_ACTION);
 | 
				
			||||||
	if (RIGHT_ACTION)
 | 
					#endif
 | 
				
			||||||
 | 
					#ifdef RIGHT_ACTION
 | 
				
			||||||
	right_action = strdup(RIGHT_ACTION);
 | 
						right_action = strdup(RIGHT_ACTION);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Scan throught the .rc files */
 | 
						/* Scan throught the .rc files */
 | 
				
			||||||
	parse_rcfile("/etc/wmifsrc", wmifs_keys);
 | 
						parse_rcfile("/etc/wmifsrc", wmifs_keys);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue