usb/hcd-ehci: Remove redundant statements
The "again" assignment is meaningless before g_assert_not_reached.
In addition, the break statements no longer needs to be after
g_assert_not_reached.
Clang static code analyzer show warning:
hw/usb/hcd-ehci.c:2108:13: warning: Value stored to 'again' is never read
            again = -1;
            ^       ~~
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200226084647.20636-13-kuhn.chenqun@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
			
			
This commit is contained in:
		
							parent
							
								
									5843b6b352
								
							
						
					
					
						commit
						e13a22db0d
					
				@ -1301,7 +1301,6 @@ static void ehci_execute_complete(EHCIQueue *q)
 | 
				
			|||||||
        /* should not be triggerable */
 | 
					        /* should not be triggerable */
 | 
				
			||||||
        fprintf(stderr, "USB invalid response %d\n", p->packet.status);
 | 
					        fprintf(stderr, "USB invalid response %d\n", p->packet.status);
 | 
				
			||||||
        g_assert_not_reached();
 | 
					        g_assert_not_reached();
 | 
				
			||||||
        break;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* TODO check 4.12 for splits */
 | 
					    /* TODO check 4.12 for splits */
 | 
				
			||||||
@ -2105,9 +2104,7 @@ static void ehci_advance_state(EHCIState *ehci, int async)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
            fprintf(stderr, "Bad state!\n");
 | 
					            fprintf(stderr, "Bad state!\n");
 | 
				
			||||||
            again = -1;
 | 
					 | 
				
			||||||
            g_assert_not_reached();
 | 
					            g_assert_not_reached();
 | 
				
			||||||
            break;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (again < 0 || itd_count > 16) {
 | 
					        if (again < 0 || itd_count > 16) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user