mirror of
				https://github.com/tmux/tmux.git
				synced 2025-10-26 12:27:15 +00:00 
			
		
		
		
	Some unnecessary assignments and unused variables.
This commit is contained in:
		
							
								
								
									
										2
									
								
								client.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								client.c
									
									
									
									
									
								
							| @@ -644,7 +644,7 @@ client_read_open(void *data, size_t datalen) | |||||||
| 	struct msg_read_done	 reply; | 	struct msg_read_done	 reply; | ||||||
| 	struct client_file	 find, *cf; | 	struct client_file	 find, *cf; | ||||||
| 	const int		 flags = O_NONBLOCK|O_RDONLY; | 	const int		 flags = O_NONBLOCK|O_RDONLY; | ||||||
| 	int			 error = 0; | 	int			 error; | ||||||
|  |  | ||||||
| 	if (datalen < sizeof *msg) | 	if (datalen < sizeof *msg) | ||||||
| 		fatalx("bad MSG_READ_OPEN size"); | 		fatalx("bad MSG_READ_OPEN size"); | ||||||
|   | |||||||
| @@ -152,7 +152,7 @@ cmd_send_keys_exec(struct cmd *self, struct cmdq_item *item) | |||||||
| 			return (CMD_RETURN_ERROR); | 			return (CMD_RETURN_ERROR); | ||||||
| 		} | 		} | ||||||
| 		if (wme != NULL && (args_has(args, 'X') || args->argc == 0)) { | 		if (wme != NULL && (args_has(args, 'X') || args->argc == 0)) { | ||||||
| 			if (wme == NULL || wme->mode->command == NULL) { | 			if (wme->mode->command == NULL) { | ||||||
| 				cmdq_error(item, "not in a mode"); | 				cmdq_error(item, "not in a mode"); | ||||||
| 				return (CMD_RETURN_ERROR); | 				return (CMD_RETURN_ERROR); | ||||||
| 			} | 			} | ||||||
|   | |||||||
| @@ -229,10 +229,8 @@ key_string_lookup_string(const char *string) | |||||||
| 			key -= 64; | 			key -= 64; | ||||||
| 		else if (key == 32) | 		else if (key == 32) | ||||||
| 			key = 0; | 			key = 0; | ||||||
| 		else if (key == '?') |  | ||||||
| 			key = 127; |  | ||||||
| 		else if (key == 63) | 		else if (key == 63) | ||||||
| 			key = KEYC_BSPACE; | 			key = 127; | ||||||
| 		else | 		else | ||||||
| 			return (KEYC_UNKNOWN); | 			return (KEYC_UNKNOWN); | ||||||
| 		modifiers &= ~KEYC_CTRL; | 		modifiers &= ~KEYC_CTRL; | ||||||
|   | |||||||
| @@ -606,10 +606,9 @@ have_event: | |||||||
| 			wp = window_get_active_at(s->curw->window, px, py); | 			wp = window_get_active_at(s->curw->window, px, py); | ||||||
| 			if (wp != NULL) | 			if (wp != NULL) | ||||||
| 				where = PANE; | 				where = PANE; | ||||||
| 		} | 			else | ||||||
|  |  | ||||||
| 		if (where == NOWHERE) |  | ||||||
| 				return (KEYC_UNKNOWN); | 				return (KEYC_UNKNOWN); | ||||||
|  | 		} | ||||||
| 		if (where == PANE) | 		if (where == PANE) | ||||||
| 			log_debug("mouse %u,%u on pane %%%u", x, y, wp->id); | 			log_debug("mouse %u,%u on pane %%%u", x, y, wp->id); | ||||||
| 		else if (where == BORDER) | 		else if (where == BORDER) | ||||||
| @@ -1543,7 +1542,7 @@ server_client_reset_state(struct client *c) | |||||||
| 	struct window_pane	*wp = w->active, *loop; | 	struct window_pane	*wp = w->active, *loop; | ||||||
| 	struct screen		*s; | 	struct screen		*s; | ||||||
| 	struct options		*oo = c->session->options; | 	struct options		*oo = c->session->options; | ||||||
| 	int			 mode, cursor = 0; | 	int			 mode, cursor; | ||||||
| 	u_int			 cx = 0, cy = 0, ox, oy, sx, sy; | 	u_int			 cx = 0, cy = 0, ox, oy, sx, sy; | ||||||
|  |  | ||||||
| 	if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED)) | 	if (c->flags & (CLIENT_CONTROL|CLIENT_SUSPENDED)) | ||||||
|   | |||||||
| @@ -348,9 +348,8 @@ window_buffer_do_paste(void *modedata, void *itemdata, struct client *c, | |||||||
| { | { | ||||||
| 	struct window_buffer_modedata	*data = modedata; | 	struct window_buffer_modedata	*data = modedata; | ||||||
| 	struct window_buffer_itemdata	*item = itemdata; | 	struct window_buffer_itemdata	*item = itemdata; | ||||||
| 	struct paste_buffer		*pb; |  | ||||||
|  |  | ||||||
| 	if ((pb = paste_get_name(item->name)) != NULL) | 	if (paste_get_name(item->name) != NULL) | ||||||
| 		mode_tree_run_command(c, NULL, data->command, item->name); | 		mode_tree_run_command(c, NULL, data->command, item->name); | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -4151,7 +4151,6 @@ window_copy_cursor_previous_word_pos(struct window_mode_entry *wme, | |||||||
| 				    data->oy >= | 				    data->oy >= | ||||||
| 				    screen_hsize(data->backing) - 1)) | 				    screen_hsize(data->backing) - 1)) | ||||||
| 					goto out; | 					goto out; | ||||||
| 				py--; |  | ||||||
|  |  | ||||||
| 				py = screen_hsize(data->backing) + data->cy - | 				py = screen_hsize(data->backing) + data->cy - | ||||||
| 				    data->oy; | 				    data->oy; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 nicm
					nicm