mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-03 20:22:59 -05:00 
			
		
		
		
	Merge pull request #3557 from Ouss4/assert
Ensure that only one definition of ASSERT is present
This commit is contained in:
		
						commit
						c60c30eb68
					
				@ -516,6 +516,9 @@ static const size_t test_lengths[2] =
 | 
				
			|||||||
    375U
 | 
					    375U
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Make sure no other definition is already present. */
 | 
				
			||||||
 | 
					#undef ASSERT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define ASSERT( cond, args )            \
 | 
					#define ASSERT( cond, args )            \
 | 
				
			||||||
    do                                  \
 | 
					    do                                  \
 | 
				
			||||||
    {                                   \
 | 
					    {                                   \
 | 
				
			||||||
 | 
				
			|||||||
@ -472,6 +472,9 @@ static const unsigned char test_mac[1][16] =
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Make sure no other definition is already present. */
 | 
				
			||||||
 | 
					#undef ASSERT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define ASSERT( cond, args )            \
 | 
					#define ASSERT( cond, args )            \
 | 
				
			||||||
    do                                  \
 | 
					    do                                  \
 | 
				
			||||||
    {                                   \
 | 
					    {                                   \
 | 
				
			||||||
 | 
				
			|||||||
@ -509,6 +509,9 @@ static const unsigned char test_mac[2][16] =
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Make sure no other definition is already present. */
 | 
				
			||||||
 | 
					#undef ASSERT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define ASSERT( cond, args )            \
 | 
					#define ASSERT( cond, args )            \
 | 
				
			||||||
    do                                  \
 | 
					    do                                  \
 | 
				
			||||||
    {                                   \
 | 
					    {                                   \
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										3
									
								
								undef_assert_before_defining_it.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								undef_assert_before_defining_it.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					Changes
 | 
				
			||||||
 | 
					   * Undefine the ASSERT macro before defining it locally, in case it is defined
 | 
				
			||||||
 | 
					     in a platform header. Contributed by Abdelatif Guettouche in #3557.
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user