mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	GCC12: Fixes for 16+
Most issues were in stringfields and had to do with comparing a pointer to an constant/interned string with NULL. Since the string was a constant, a pointer to it could never be NULL so the comparison was always "true". gcc now complains about that. There were also a few issues where determining if there was enough space for a memcpy or s(n)printf which were fixed by defining some of the involved variables as "volatile". There were also a few other miscellaneous fixes. ASTERISK-30044 Change-Id: Ia081ca1bcfb329df6487c4660aaf1944309eb570
This commit is contained in:
		
				
					committed by
					
						 Joshua Colp
						Joshua Colp
					
				
			
			
				
	
			
			
			
						parent
						
							dfd2e4006b
						
					
				
				
					commit
					ad6af63895
				
			| @@ -1287,7 +1287,7 @@ static int require_pgsql(const char *database, const char *tablename, va_list ap | ||||
| 				res = -1; | ||||
| 			} else { | ||||
| 				struct ast_str *sql = ast_str_create(100); | ||||
| 				char fieldtype[10]; | ||||
| 				char fieldtype[20]; | ||||
| 				PGresult *result; | ||||
|  | ||||
| 				if (requirements == RQ_CREATECHAR || type == RQ_CHAR) { | ||||
|   | ||||
| @@ -367,7 +367,7 @@ static int detect_callback(struct ast_audiohook *audiohook, struct ast_channel * | ||||
| 		return 0; | ||||
| 	} | ||||
|  | ||||
| 	if (!(direction == AST_AUDIOHOOK_DIRECTION_READ ? &di->rx : &di->tx)) { | ||||
| 	if (!(direction == AST_AUDIOHOOK_DIRECTION_READ ? di->rx : di->tx)) { | ||||
| 		return 0; | ||||
| 	} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user