File size: 188,911 Bytes
6ccead2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
text
"<s>[INST] find the error in this code: #include ""c_standards.h""
SINT_32 static_12(SINT_32 p_1, SINT_32 p_2)
{ SINT_32 i = 1; SINT_32 j = 0; if (p_1 > 0) { i = i - 1; } else i = i + 1; if (p_2 > 0) { j = j + p_2; } else if (p_2 < 0) { j = j - p_2; } else { j = i; } return j;
} [/INST] The error is erreur de syntax </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define ArraySize 3.0F
void static_109(void)
{ UINT_32 fl_arr[ (UINT_32) ArraySize ] = {0,1,2};
} [/INST] The error is la taille d'un tableau en C doit être spécifiée en utilisant un entier </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_110(void)
{
} [/INST] The error is la fonction est vide </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_111(void)
{ SINT_32 jump_flag = 0;
start: jump_flag++; if (jump_flag < 10) { goto start; }
} [/INST] The error is L'utilisation de l'instruction goto peut rendre le code difficile à lire et à maintenir </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef SINT_32 mytype;
typedef struct st1 { SINT_32 a; SINT_32 b; } st1;
void static_112(void)
{ typedef FLOAT_32 mytype;
} [/INST] The error is confusion, même alias de type avec une signification différente à l'intérieur de la fonction </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <wchar.h>
void static_113(void)
{ CHAR non_std_char = 'ù'; CHAR *poss_string = ""$Id: 56$""; wchar_t non_std_wchar = L'ù';
} [/INST] The error is utilisation des caractères qui ne sont pas conformes au jeu de caractères standard ASCII </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_114(BOOL bl, UINT_32 a)
{ UINT_32 x; BOOL flag; flag = bl + bl; if (a) { ; } if (1 && bl) { ; } x = ( a && bl ? 1U : 0U );
} [/INST] The error is Dans la deuxième condition if (1 && bl), la condition 1 est toujours vraie, donc la vérification de bl est redondante. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_115(void)
{ CHAR* str1 = ""string\ literal""; CHAR* str2 = ""string literal""; } [/INST] The error is problème de continuation de la chaîne sur plusieurs lignes. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_116 (void)
{ UINT_32 x = 2u; if ( x == 1u ) { ; } if ( x != 0u ) { ; }
} [/INST] The error is Pas d'erreur </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void main(void)
{
} [/INST] The error is la fonction main doit toujours renvoyer un entier. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_13(void)
{ SINT_32 jump_flag = 0;
start: jump_flag++; if (jump_flag < 10) { goto start; }
} [/INST] The error is The use of goto is usually considered bad practice, as its use leads to code that can be difficult to read and maintain. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_119(void)
{ UINT_32 x; x = 2U // /* - not compliant + 5U // */ ; /* User might expect +5U to be commented out */
/* This is the Outer Comment /* This is the Inner Comment - not compliant */
} [/INST] The error is Nested comment found </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_120(void)
{ SINT_32 b = 1; b = b | 1;
} [/INST] The error is Use of bit operator on signed type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_121(void)
{ BOOL flag = FALSE; switch (flag) { case TRUE: break; case FALSE: break; default: break; }
} [/INST] The error is Use of boolean expression in switch. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
void static_122(BOOL flag)
{ if (flag) { abort(); } exit(0);
} [/INST] The error is Use of abort, exit, etc. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_123(void)
{ enum E_type { Enum1, Enum2 , Enum3}; UINT_32 ui; ui = Enum1;
} [/INST] The error is Use of underlying enum representation value. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_124(void)
{ SINT_32 x = 1; ++x;
} [/INST] The error is Use of prefix ++ or --. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
#define cat(x) (&string[##(x)])
void static_125( UCHAR string[50], UINT_32 n)
{ UCHAR *token1; token1 = cat(n);
} [/INST] The error is Use of ## or # in a macro. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define MISMATCHEDIF 1
#if MISMATCHEDIF == 1
void static_126(void)
{
} [/INST] The error is A #if has no #endif in the same file. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 garray[];
void static_127( INT_32 par[] )
{ INT_32 array[] = {0,1,2};
} [/INST] The error is Array has no bounds specified. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 global_int = 0;
void static_128(UINT_32* global_int)
{
} [/INST] The error is Parameter has same name as global variable. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void test_14s(SINT_32 p_1)
{ }
void static_14(void (*p_proc_pointer)(SINT_32 parameter_1) )
{ p_proc_pointer = test_14s;
} [/INST] The error is Procedural parameter declared. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct DUPLICATE
{ UINT_32 field1; UINT_32 field2;
};
void static_129(UINT_32 DUPLICATE)
{
} [/INST] The error is Parameter has same name as type or tag. </s>"
"<s>[INST] find the error in this code: #include <stdio.h>
void static_130 (void)
{
} [/INST] The error is Included file is not permitted. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void STATIC_131(UINT_32 p_1)
{ UINT_32 static_131; BOOL c_1 = FALSE; if (c_1) { UINT_32 static_131 = 1u; static_131 = static_131 + 1u; } static_131 = p_1;
} [/INST] The error is Name reused in inner scope. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_132(void)
{ BOOL flag = FALSE; if (flag = FALSE) { }
} [/INST] The error is Assignment operator in boolean expression. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_133(void)
{ BOOL flag = FALSE; INT_32 y = 0, x = 0; if ( flag && ((x = y) == 0) ) { }
} [/INST] The error is Assignment operator in RHS of && or ||. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_134(void)
{ UINT_32 y = 2u, x = 0u, z = 1u; volatile UINT_32 v = 1U; UINT_32 arr[2] = { v, 1U }; x = (v + z) / (v * y);
} [/INST] The error is Volatile variable in complex expression. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_135( p_1, p_2)
UINT_32 p_1;
UINT_32 p_2;
{
} [/INST] The error is Parameter list is KR. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_136(void)
{ UINT_32 x = 1u; BOOL flag = FALSE; if ((flag | (x != 0u)) == FALSE) { }
} [/INST] The error is Bit operator with boolean operand. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct s_138 {UINT_32 x, :2;};
void static_138(void)
{
} [/INST] The error is Anonymous bit field used in structure. </s>"
"<s>[INST] find the error in this code: #define defval 0
typedef enum { LANE_0 = 0, LANE_1 = 1, LANE_LAST = 3 } lane_t;
extern lane_t get_lane ( void );
void static_139( void )
{ lane_t lane = get_lane(); if ( (lane > LANE_0) && ( lane <= LANE_LAST)) { } if (defval) { }
} [/INST] The error is Construct leads to infeasible code. </s>"
"<s>[INST] find the error in this code: static void static_16(void)
{
start:begin: ;
} [/INST] The error is Multiple labels declared. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define defval 0
#define LOOP(x) do { x } while (0)
void static_140(void)
{ while (0) { } while( defval ) { } do { } while (0); LOOP(;);
} [/INST] The error is Infeasible loop condition found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_142(UINT_32 , UINT_16 p_2)
{
} [/INST] The error is Parameter list declarations are inconsistent. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 static_143(UINT_32 p_1)
{ UINT_32 result; result = p_1{}; return result;
} [/INST] The error is Curly brackets used in expression. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
FLOAT_32 static_144(FLOAT_32 p_1,FLOAT_32 p_2)
{ FLOAT_32 result; result = p_1 + p_2; return result;
} [/INST] The error is Floating point not permitted. </s>"
"<s>[INST] find the error in this code: #define static_145 6
#if static_145 i
#endif [/INST] The error is #if has invalid expression. </s>"
"<s>[INST] find the error in this code: #define static_146() (""dummy()"")
void dummy(void); [/INST] The error is #define with empty parameter list. </s>"
"<s>[INST] find the error in this code: #ifdef STATIC_147 typedef unsigned char UCHAR;
#endif ;
void static_147(void)
{
} [/INST] The error is Spurious characters after preprocessor directive. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static_148(UINT_32 p1);
static_148(UINT_32 p1)
{
} [/INST] The error is No return type for function/procedure. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
CHAR *static_149( CHAR *p1);
void test_149(void)
{ CHAR *a = ""Query""; CHAR *b; b = static_149(a);
}
CHAR *static_149( CHAR *p1 )
{ static CHAR *newA = ""Response""; p1++; p1 = p1+1; p1 = newA; return p1;
} [/INST] The error is Reference parameter to procedure is reassigned. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
volatile UINT_32 STATIC_150(void);
volatile UINT_32 STATIC_150(void)
{ volatile UINT_32 r; return r;
} [/INST] The error is Volatile or const used in function type. </s>"
"<s>[INST] find the error in this code: static void static_17(void)
{ _asm { mov eax,01h }
} [/INST] The error is Code insert found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 globvar;
#define STATIC_151 globvar
void static_151 (void)
{
} [/INST] The error is Use of global variable in macro definition. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define STATIC_152 3
void static_152 (void)
{
} [/INST] The error is Use of a comment in a macro definition. </s>"
"<s>[INST] find the error in this code: #ifdef STATIC_153
#endif
void static_153 (void)
{
} [/INST] The error is Use of a comment in a pre-processor directive. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#ifdef STATIC_155 this acts as a comment, as STATIC_155 is undefined.
#endif
void static_155 (void)
{
} [/INST] The error is Comments between preprocessor directives. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define STATIC_156(x) defined(x)
#if STATIC_156(c)
UINT_32 var1;
#else
SINT_32 var1;
#endif
#define c 1
#if STATIC_156(c)
UINT_32 var2;
#else
SINT_32 var2;
#endif
void static_156( void )
{
} [/INST] The error is Use of 'defined' keyword in macro body. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_157(void)
{ CHAR arr[6] = """"; CHAR *ptr_arr = arr; CHAR *c = ""1234567890""; c[7] = '0'; *(c+6) = '1'; ptr_arr[2] = '2';
} [/INST] The error is Modification of string literal. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_158(void)
{ INT_32 a1,b1,c1,d1,e1; INT_32 a2,b2,c2,d2,e2; INT_32 a3,b3,c3,d3,e3; if( (a1==0) && (b1==0) && (c1==0) && (d1==0) && (e1==0) && (a2==0) && (b2==0) && (c2==0) && (d2==0) && (e2==0) && (a3==0) && (b3==0) && (c3==0) && (d3==0) && (e3==0) ) { }
} [/INST] The error is Expression with more than *** subconditions. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_18(UINT_32 p_1, UINT_32 p_2, UINT_32 p_3, UINT_32 p_4, UINT_32 p_5, UINT_32 p_6, UINT_32 p_7, UINT_32 p_8)
{
} [/INST] The error is No space between * or & and name in declaration. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
void static_159(void)
{ CHAR *message = ""TEST""; if ( message != NULL ) { } if ( message != 0 ) { }
} [/INST] The error is Comparing pointer with zero or NULL. </s>"
"<s>[INST] find the error in this code: #define A B
#define B A
#define C D
#define D E
#define E C
main(){
int B;
int C;
} [/INST] The error is Loop in macro expansion. </s>"
"<s>[INST] find the error in this code: void Static_163( void )
{
} [/INST] The error is Function starts with upper case character. </s>"
"<s>[INST] find the error in this code: #include <stdio.h>
static void proc(void *ptr) { ; }
void * a_proc ( void )
{ return NULL;
}
void static_164 ( void )
{ void * p = a_proc(); proc(p);
} [/INST] The error is Use of void * pointer. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void aproc( SINT_32 iv_param) {;}
static void bproc(const SINT_32 ic_param) {;}
static SINT_32 static_168 (void)
{ SINT_32 loc_var = 0; aproc(loc_var); bproc(loc_var);
} [/INST] The error is Call by value parameter not const. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_170( void );
static void static_170( void )
{ aproc() ;
} [/INST] The error is Procedure call has no prototype and no defn. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UCHAR a;
UCHAR a;
UCHAR b;
UCHAR b = 3;
extern UCHAR c;
extern UCHAR c;
extern UCHAR ok;
UCHAR ok = 3U;
static void static_172( void )
{ ;
} [/INST] The error is Variable declared multiply. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_175 (void)
{
}
INT_32 main (void)
{
} [/INST] The error is Function starts with lower case character. </s>"
"<s>[INST] find the error in this code: void static_176 (void)
{ char c = 'b'; switch(c) { case '\m': break; default: break; }
} [/INST] The error is Non standard escape sequence in source. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 okvar, notok2;
void static_177(void)
{ okvar = 0; notok2 = 2;
} [/INST] The error is Identifier not declared on new line. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_19( void ( * p_proc_pointer )(void) )
{ p_proc_pointer();
} [/INST] The error is Procedural para used in an uncalled procedure. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 * oka;
INT_32 b; INT_32 *notoka;
void proc( INT_32 * s, INT_32 *ok);
struct tag0 { INT_32 * w; INT_32 *notokq;} astr;
static void static_178(void)
{ oka = 0;
} [/INST] The error is Declaration statement not on new line. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include ""Static_179.h""
static void static_179(void)
{ ;
} [/INST] The error is Extern not at start of header file. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 *notoka;
typedef INT_32 *ptr;
void static_180(INT_32 *p1)
{ *notoka = *p1;
} [/INST] The error is No space between * or & and name in declaration. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 main(void)
{ INT_32 i=3; if( 1==2 ) {2;} switch(i){ } switch (i){ } while(i==0){2;} do{2;}while(i==0); for(i=0;i>2;i++){2;}
} [/INST] The error is No space between if, while, for and expresn. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_182(void)
{ INT_32 i; for ( i = 0;i < 5;i++ ) { i++; }
} [/INST] The error is No space after semi colon in for expression. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_183(void)
{ INT_32 i; INT_32 j; for ( i = 0; i < 5; i++ ) { i++;}
} [/INST] The error is No newline after semi colon. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_185(void)
{ INT_32 i=9; INT_32 j=19; INT_32 * p; i = - j; p = & j; * p = 77; *p = * p + 77;
} [/INST] The error is Space between unary operator and operand. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_186( void )
{ INT_32 i = 9; INT_32 j =8; INT_32 k= 7; UINT_32 x = 3u; UINT_32 y = 17u; i= j; i = j /k; i = j <<k; i = j && k;
} [/INST] The error is Space missing before or after binary operator. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 main(void)
{ INT_32 iiiiiiiiiiiii = 0; iiiiiiiiiiiii = iiiiiiiiiiiii + iiiiiiiiiiiii + iiiiiiiiiiiii + iiiiiiiiiiiii + iiiiiiiiiiiii;
} [/INST] The error is Input line exceeds limit. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 static_20_135( p_1 )
{ UINT_32 result; result = p_1 * 2; return result;
} [/INST] The error is Parameter not declared explicitly. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_190( int32_t value )
{ int32_t x = 0; if( value == 0 ) { x = 1; } else { x = 0; }
} [/INST] The error is { ... } contents not indented by *** spaces. </s>"
"<s>[INST] find the error in this code: void notokproc1 ()
{
} [/INST] The error is Space between function name and parenthesis. </s>"
<s>[INST] find the error in this code: static void proc1(void) { ; } [/INST] The error is Static not on separate line in function defn. </s>
"<s>[INST] find the error in this code: static void proc2(void)
{
} [/INST] The error is Function return type needs a new line. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define ACONSTAT 100
const INT_16 BCONSTAT = 100;
void static_200 ( void )
{ INT_16 ss; ss = ACONSTAT; ss = BCONSTAT;
} [/INST] The error is Define used for numeric constant. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define ACONSTANT 101
SINT_32 static_201(void)
{ const SINT_16 max = 17; SINT_16 y = 77; SINT_16 z; z = 131; z = ACONSTANT; z = 0; z = 1; z = 2; return 0;
} [/INST] The error is Use of numeric literal in expression. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const INT_16 con = 19;
const INT_16 * pcon;
static void static_203(void)
{ INT_16 x; INT_16 *p; x = (INT_16)con; p = (INT_16 *)pcon;
} [/INST] The error is Cast on a constant value. </s>"
"<s>[INST] find the error in this code: #define goto some_total_rubbish ----------
void static_204 (void)
{ ;
} [/INST] The error is continue or goto not defined to rubbish. </s>"
"<s>[INST] find the error in this code: #ifndef XXX
#define XXX
#endif
static void static_209( void )
{
} [/INST] The error is Preprocessor command indented. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define my_sq_macro(X) ((X) * (X))
UINT_32 static_210(UINT_32 p1)
{ return my_sq_macro(p1);
} [/INST] The error is Macro name is not upper case. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 test_21(UINT_32 p_1, UINT_16 p_2)
{ UINT_32 result = 0; result = p_1 + p_2; return result;
}
void static_21(UINT_32 p_1, UINT_16 p_2)
{ test_21(1u, 2u ,2u);
} [/INST] The error is Number of parameters does not match. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_216( void )
{ UCHAR * pointer; UCHAR * ptr; UCHAR * aptr;
} [/INST] The error is Pointer name does not have required suffix. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 Foobar;
INT_32 foobar;
INT_32 fOobar;
void aproc(CHAR aC2, INT_32 FooBar) {;}
void static_217 (void)
{ struct tag{ CHAR aC1; INT_32 FooBar;} local;
} [/INST] The error is Pointer name does not have required suffix. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void strstr(INT_32 x){;}
void strcmp(INT_32 x){;}
static void static_218 (void)
{ strstr(2); strcmp(1);
} [/INST] The error is Name is used in standard libraries. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef int _INT_NOK;
static void static_219 ( void )
{ INT_32 _ohno;
} [/INST] The error is User name starts with underscore. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct lower
{ CHAR c;
};
struct Upper
{ CHAR c;
};
union lowerun
{ CHAR cu; INT_16 iu;
};
typedef struct Upper lowstrtype;
void static_221 (void)
{ struct lower s;
} [/INST] The error is Start of class/struct/union/enum lower case. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 ok;
INT_32 Notok;
void static_222(void)
{ ok = Notok;
} [/INST] The error is Start of variable is upper case. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 func(INT_32 p){return 7;}
INT_32 GLOBpx_func(INT_32 q){return 11;}
INT_32 main(void){
} [/INST] The error is No prefix for global function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
enum { red, green, Blue};
void static_224 ( void )
{ ;
} [/INST] The error is Start of enumeration is upper case. </s>"
"<s>[INST] find the error in this code: void static_225 ( void )
{ ;
} [/INST] The error is Inappropriate file extension. </s>"
"<s>[INST] find the error in this code: typedef unsigned UINT;
enum {won=1,too=2};
struct tag{ UINT dec:2; UINT oct:02; UINT hex:0x3; UINT enumr:won; UINT decu:3u;
};
void static_226 (void)
{ ;
} [/INST] The error is Bit field is not octal, hex or suffix u. </s>"
<s>[INST] find the error in this code: #define COMMON_SYM_CONSTANT ((2U * 3U) + 2U [/INST] The error is Bracket mismatch ( or { in macro definition. </s>
<s>[INST] find the error in this code: #define COMMON_SYM_CONSTANT 2U * 3U + 2U) [/INST] The error is Bracket mismatch ) or } in macro definition. </s>
"<s>[INST] find the error in this code: #include ""Static_243.h""
static void static_243 ( void ) { ; } [/INST] The error is Included file not protected with #define. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef enum Choice
{ first, second, third, fourth
} Choice;
INT_32 a1 = 1;
INT_32 errorflag = 0;
static void static_245(Choice chooser)
{ INT_32 b1 = 2; INT_32 c1 = 1; switch (chooser) { case first: a1 = b1; break; case second: case third: a1 = c1; if (a1 == b1) { case fourth: } break; default: errorflag = 1; break; }
} [/INST] The error is Case statement in nested block. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define COMMON_MACRO(X) (ANOTHER_MACRO(X))
#define SOME_MACRO(X) (NESTED_MACRO1(X))
#define NESTED_MACRO1(X) (NESTED_MACRO2(X))
#define NESTED_MACRO2(X) (COMMON_MACRO(X))
#define ANOTHER_MACRO(X) (X)
const SINT_32 s1 = 42;
void static_247(void)
{ SINT_32 myInt = COMMON_MACRO(SOME_MACRO(s1));
} [/INST] The error is Macro definition calls itself. </s>"
"<s>[INST] find the error in this code: #define DEBUG2 2
#define DEBUG1 0
#define COMMON_MACRO(X,Y) ((X)/(Y))
#if (COMMON_MACRO(DEBUG2,DEBUG1)) == 1
#endif
void static_248(void)
{
} [/INST] The error is Divide by zero in preprocessor directive. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_249 (void)
{ BOOL bvar = FALSE; UINT_32 u32 = 5U; u32 = u32 << bvar;
} [/INST] The error is Shift operator with boolean operand. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const SINT_64 fr1 = 64l;
const SINT_64 fr2 = 64L;
void static_252(void)
{ SINT_64 x1 = fr2;
} [/INST] The error is Lower case suffix to literal number. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_2 (void)
{ UINT_32 y = 0u;
value_x: y = 1u; { value_x: y= 2u; }
} [/INST] The error is Label name reused. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 static_23(UINT_32 p)
{ UINT_32 x = 1u; x = x + p; return x;
}
INT_32 main(void)
{ return (0);
} [/INST] The error is Procedure is not explicitly called in code analysed. </s>"
"<s>[INST] find the error in this code: #define DEBUG 1
#define DEBUG_ERROR 1
#ifdef WIN32
#include <windows.h>
#endif
#if DEBUG == 1
#ifdef DEBUG_ERROR
#endif
#elif DEBUG == 2
#else
#endif
void static_255(void)
{
} [/INST] The error is Found #if, #ifdef, #else, #elif . </s>"
"<s>[INST] find the error in this code: #include <foo.h>
#include ""anotherFoo.h""
void static_257(void)
{
} [/INST] The error is Filename in #include not in < > . </s>"
"<s>[INST] find the error in this code: typedef enum mask_enum_type
{ mask_first = 0X01, mask_all = 0xff
} mask_enum_type; [/INST] The error is Hexadecimal number with lower case char. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_268(void)
{ UINT_32 loop = 0U; const UINT_32 max = 10U; for (; loop < max; loop++) { }
} [/INST] The error is Empty initialisation exprsn in for loop. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_269(void)
{ UINT_32 loop; UINT_32 myVar = 0U; const UINT_32 max = 10U; for (loop = 0U; loop < max;) { }
} [/INST] The error is Empty increment exprsn in for loop. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_270(void)
{ UINT_32 loop; UINT_32 myVar = 0U; const UINT_32 max = 10U; for ( ++myVar, loop = 0U; loop < max; loop++ ) { }
} [/INST] The error is For loop initialisation is not simple. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_271(void)
{ UINT_32 loop; UINT_32 myVar = 0U; const UINT_32 max = 10U; for (loop = 0U; loop < max; myVar++, loop++) { }
} [/INST] The error is For loop incrementation is not simple. </s>"
"<s>[INST] find the error in this code: #ifndef STATIC_272_H
#define STATIC_272_H
#ifndef REPORT_ERRORS
#define REPORT_WARNINGS
#endif
#endif [/INST] The error is Found #ifndef (ref. removed). </s>"
"<s>[INST] find the error in this code: #include ""Static_272.h""
static void static_272 ( void )
{ ;
} [/INST] The error is Found #ifndef (ref. removed). </s>"
"<s>[INST] find the error in this code: #ifndef STATIC_273_H
#define STATIC_273_H
#define MYSQMACRO ((X) * (X))
#endif [/INST] The error is Found #define. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_24(void)
{ UINT_32 x; x = 1u; x = x + 1u;
} [/INST] The error is Use of Noanalysis annotation. </s>"
"<s>[INST] find the error in this code: #include ""Static_273.h""
static void static_273 ( void )
{ ;
} [/INST] The error is Found #define. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_274(void)
{ UINT_32 x; UINT_32 yCoordinate;
} [/INST] The error is Name found with length less than ***. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct
{ UINT_32 x_value; UINT_32 y_value;
} pos_var;
struct Position
{ UINT_32 anon_x_value; UINT_32 anon_y_Value;
};
void static_275(void)
{ pos_var.x_value = 0U; pos_var.y_value = 0U; struct Position first_pos = {1U, 1U}; struct Position second_pos = {2U, 1U};
} [/INST] The error is Tag missing in struct, union or enum. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef enum Seasons
{ spring, summer, autumn, winter
} Seasons;
Seasons season;
UINT_32 x1;
void static_276(void)
{ switch (season) { case spring: x1 = 1U; break; case summer: x1 = 4U; break; case autumn: x1 = 7U; break; case 4: x1 = 10U; break; default: break; }
} [/INST] The error is Case is not part of switch enumeration. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 season;
UINT_32 x1;
void static_277(void)
{ switch (season) { case 1: x1 = 1U; break; case 2: x1 = 4U; break; case 3: x1 = 7U; break; case 4: x1 = 10U; break; default: break; }
} [/INST] The error is Switch chooser is not an enumeration. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef enum Seasons
{ spring, summer, autumn, winter
} Seasons;
Seasons season;
UINT_32 x1;
void static_278(void)
{ switch (season) { case spring: x1 = 1U; break; case summer: x1 = 4U; break; case autumn: x1 = 7U; break; default: break; }
} [/INST] The error is Switch has missing or extra cases. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_284(UINT_16 shortint)
{ UINT_64 LongInt; LongInt = (UINT_64)(UINT_32)shortint;
} [/INST] The error is Cast preceded by a cast. </s>"
"<s>[INST] find the error in this code: #ifndef STATIC_286_H
#define STATIC_286_H
typedef unsigned int Uint_32;
void static_286_header(void)
{
}
#endif [/INST] The error is Functions defined in header file. </s>"
"<s>[INST] find the error in this code: #include ""Static_286.h""
static void static_286 ( void )
{ ;
} [/INST] The error is Functions defined in header file. </s>"
"<s>[INST] find the error in this code: #ifndef STATIC_287_H
#define STATIC_287_H
#include ""c_standards.h""
const UINT_32 const_var = 99U;
UINT_32 myVar = 3U;
#endif [/INST] The error is Variable definition in header file. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
SINT_32 static_25(SINT_32 p_1)
{ SINT_32 i = 0, j = 0; switch (p_1) { case 0: j = 0; break; case 1: case 2: j=i; break; default: i = j + 1; } return i + j;
} [/INST] The error is Null case in switch statement. </s>"
"<s>[INST] find the error in this code: #include ""Static_287.h""
static void static_287 ( void )
{ ;
} [/INST] The error is Variable definition in header file. </s>"
"<s>[INST] find the error in this code: #include ""Static_288.x""
#include ""Static_288.hpp""
static void static_288 ( void )
{ ;
} [/INST] The error is Header file is not .h. </s>"
"<s>[INST] find the error in this code: #include <foo.h>
#include<anotherFoo.h>
static void static_292 (void)
{
} [/INST] The error is No space between #include and filename. </s>"
"<s>[INST] find the error in this code: __inline__ void check_ansi(void)
{ ;
}
void static_293 ( void )
{ check_ansi ( );
} [/INST] The error is Non ANSI/ISO construct used. </s>"
"<s>[INST] find the error in this code: static void static_295(void)
<%
%> [/INST] The error is Use of digraph. </s>"
"<s>[INST] find the error in this code: void static_296(void)
{ void bar(void);
} [/INST] The error is Function declared at block scope. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
extern void drawline(UINT_32 length);
typedef void (*fptr_nok)(UINT_32 len);
typedef void (* const fptr_ok)(UINT_32 len);
static void static_298(void)
{ fptr_nok DRAW_FN1 = drawline; const fptr_nok DRAW_FN2 = drawline; fptr_ok DRAW_FN3 = drawline; DRAW_FN1(3U); DRAW_FN2(3U); DRAW_FN3(3U);
} [/INST] The error is Non const pointer to function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
extern void drawline(UINT_32 length);
typedef void (*fntypePtr)(UINT_32 length);
typedef void (fntype)(UINT_32 length);
void static_299 (void)
{ fntypePtr DRAW_FN1 = drawline; fntype *DRAW_FN2 = drawline; void (*fptr)(UINT_32 len); fptr = drawline; DRAW_FN1(3U); DRAW_FN2(3U); fptr(3U);
} [/INST] The error is Pointer to function declared without typedef. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_26 (void)
{ UINT_32 a = 0U; while (1) { } do { } while (1); for (a = 0U; ; a++) { }
} [/INST] The error is Loop control expression may not terminate loop. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const UINT_32 limit = 32U;
void static_301(UINT_32 myParam)
{ if (myParam > limit) { myParam = limit;
}
} [/INST] The error is } not aligned vertically below {. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const UINT_32 limit = 32U;
void static_302 (UINT_32 myParam)
{ if (myParam > limit) { myParam = limit; }
} [/INST] The error is Comment possibly contains code. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const UINT_32 scale = 32U;
void static_304( UINT_32 myParam )
{ myParam = myParam * scale;
} [/INST] The error is Arithmetic performed on unsigned values. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const UINT_32 scale = 32U;
void static_305 (UINT_32 myParam)
{ UINT_32 result = myParam * scale;
} [/INST] The error is Unused inspect annotation for standard ... </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const UINT_32 limit = 32U;
void static_307(UINT_32 myParam)
{ if (myParam > limit) {
#error } else {
#line 4 myOtherFile.c myParam++; }
} [/INST] The error is Use of #line, #error preprocessor directives. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_309 (UINT_16 *my_int_ptr)
{ ;
} [/INST] The error is * or & not attached to type in declaration. </s>"
"<s>[INST] find the error in this code: void Static_312(void)
{
} [/INST] The error is Function name is not all lower case. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_313(void)
{ UINT_32 myVar;
} [/INST] The error is Variable name is not all lower case. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef enum FavouriteSeasons
{ spring
} FavouriteSeasons;
FavouriteSeasons season;
UINT_32 x1;
void static_314 (void)
{ switch (season) { case spring: x1 = 1U; break; default: break; }
} [/INST] The error is Switch has only 1 case and default. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const UINT_32 xstart = 1U;
const UINT_32 yend = 240U;
typedef struct Position
{ UINT_32 xValue; UINT_32 yValue;
} Position;
void static_315( void )
{ Position myPos; myPos .xValue = xstart; myPos. yValue = yend;
} [/INST] The error is Blank before/after . operator. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_27( UINT_32 p_1, UINT_32 p_2)
{ UINT_32 result; result = p_1 + p_2; return result;
} [/INST] The error is Void procedure with return statement. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef struct Message
{ SINT_32 x_set:0x4; UINT_32 y_set:0x4;
} Message;
void static_316(void)
{ Message message_chunk;
} [/INST] The error is Bit field is not unsigned integral. </s>"
"<s>[INST] find the error in this code: typedef unsigned int uint_32;
typedef struct Position
{ uint_32 x_value; uint_32 y_value;
} Position;
void static_317(void)
{ Position my_pos;
} [/INST] The error is Typedef name doesn't start with upper case letter. </s>"
"<s>[INST] find the error in this code: typedef unsigned int UINT_32;
typedef struct Position
{ UINT_32 x_value; UINT_32 y_value;
} Position;
typedef enum Colour_RGB
{ red, green, blue
} Colour_RGB;
typedef struct ACRORGB
{ UINT_32 red_el; UINT_32 green_el; UINT_32 blue_el;
} ACRORGB;
void static_318(void)
{ Position my_pos; Colour_RGB col = red; ACRORGB my_col_struct;
} [/INST] The error is Upper case letter found after first character. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef enum FavouriteSeasons
{ spring, summer, autumn, winter
} FavouriteSeasons;
FavouriteSeasons season;
UINT_32 x1;
static void static_322(void)
{ switch (season) { case spring: x1 = 1U; break; case summer: x1 = 4U; break; case autumn: x1 = 7U; break; default: break; case winter: x1 = 10U; break; }
} [/INST] The error is Default is not last case of switch. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef enum FavouriteSeasons
{ spring, summer, autumn, winter
} FavouriteSeasons;
FavouriteSeasons season;
UINT_32 x1;
void static_323(void)
{ switch (season) { case spring: x1 = 1U; break; case summer: x1 = 4U; break; case autumn: x1 = 7U; break; case winter: x1 = 10U; break; default: break; default: break; }
} [/INST] The error is Switch has more than one default case. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define COMMON_MACRO(X, Y) ((X) * (Y))
const SINT_32 s1 = 42;
void static_324(void)
{ SINT_32 myInt = COMMON_MACRO(s1);
} [/INST] The error is Macro call has wrong number of parameters. </s>"
"<s>[INST] find the error in this code: typedef signed int Sint_32;
typedef signed char Char;
void foo(void)
{ { struct tag_name { Sint_32 tag_component2; } tag_name2; } { union tag_name { Sint_32 tag_component3; Char tag_component4; } tag_name3; }
} [/INST] The error is Inconsistent use of tag. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static foo(void);
static SINT_32 static_326(void); [/INST] The error is Declaration is missing type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef struct Message
{ UINT_32 x_set:0x4; UINT_32 y_set:0x4; UINT_32 z_set;
} Message;
void static_328(void)
{ Message message_chunk;
} [/INST] The error is Non bit field member in bitfield struct. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_329( char ch8, SINT_8 s8, SINT_16 s16 )
{ char cha; SINT_8 s8a; SINT_16 s16a; ch8++; s16a = ch8 + s16; s8a = ch8 + s8; s8a = ch8 + 4;
} [/INST] The error is Operation not appropriate to plain char. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_29(void)
{ UINT_32 x = 1u; UINT_32 y = 2u; UINT_32 z = 3u; x += 1u; z -= y;
} [/INST] The error is Use of += or -= operators found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_331(void)
{ UINT_32 x1 = 5; UINT_32 y1 = 6U; UINT_64 z1 = 0; y1 = y1 * 7;
} [/INST] The error is Literal value requires a U suffix. </s>"
"<s>[INST] find the error in this code: typedef unsigned short Uint_16;
typedef unsigned int Uint_32;
Uint_16 u16a = 40000U;
Uint_16 u16b = 30000U;
void static_332( void )
{ Uint_32 u32 = (Uint_32) (u16a + u16b); u32 = (Uint_32)(++u16a);
} [/INST] The error is Widening cast on complex integer expression. </s>"
"<s>[INST] find the error in this code: typedef float Float_32;
typedef double Float_64;
void static_333(void)
{ Float_32 f32a = 4.0F; Float_32 f32b = 3.0F; Float_64 f64 = (Float_64) (f32a + f32b);
} [/INST] The error is Widening cast on complex float expression. </s>"
"<s>[INST] find the error in this code: typedef unsigned short Uint_16;
typedef unsigned char Uint_8;
Uint_8 port = 0x5aU;
Uint_16 mode = 0xffff;
Uint_16 result_16;
Uint_16 another_result_16;
void static_334 (void)
{ result_16 = ((port << 4) & mode) >> 6; another_result_16 = ((Uint_16)((Uint_16)port << 4) & mode) >> 6;
} [/INST] The error is No cast when ~ or << applied to small types (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const UINT_32 max_value = 255U;
#if defined(X > Y)
#endif [/INST] The error is Operator defined contains illegal items. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const UINT_32 max_value = 255U;
#define DEFINED defined
#if DEFINED(X)
#endif [/INST] The error is #if expansion contains define operator. </s>"
"<s>[INST] find the error in this code: #if DEBUG1
#else
#endif
void static_337(void)
{
} [/INST] The error is Undefined macro variable in #if. </s>"
"<s>[INST] find the error in this code: typedef unsigned int Uint_32;
#include ""c_standards.h""
void static_338(void)
{ ;
} [/INST] The error is #include preceded by non preproc directives. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include ""bar.h""
void static_339(void)
{ ;
} [/INST] The error is #include directive with illegal items. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define COMMON_MACRO(X, Y) ((X) * (Y))
const SINT_32 s1 = 42;
const SINT_32 s2 = 7;
SINT_32 static_340(void)
{ SINT_32 myInt = COMMON_MACRO(s1, s2); return myInt;
} [/INST] The error is Use of function like macro. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo( UINT_32 p_x)
{
}
void static_30(void)
{ UINT_32 x = 1u; UINT_32 y = 2u; BOOL flag = FALSE; if (flag == FALSE) { x++; } x = x + y++; foo( x++ );
} [/INST] The error is Deprecated usage of ++ or -- operators found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define S1
#define COMMON_MACRO(X) (X)
SINT_32 static_341(void)
{ SINT_32 my_int = COMMON_MACRO(
#ifdef S1 1
#else 2
#endif ); return my_int;
} [/INST] The error is Preprocessor construct as macro parameter. </s>"
"<s>[INST] find the error in this code: #define DIAGS
typedef enum Flag
{ on, off
} Flag;
#ifdef DIAGS Flag x1 = on;
#else1 Flag x1 = off;
#endif
void static_342 (void)
{ ;
} [/INST] The error is Extra chars after preprocessor directive. </s>"
"<s>[INST] find the error in this code: #define DEBUG1 1
#if DEBUG1 == 1
#include ""Static_343.h""
#else
#endif [/INST] The error is #else has no #if, etc in the same file. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
volatile UINT_32 * vp1;
UINT_32 * volatile pv2;
static void static_344 ( void )
{ UINT_32 *y2 = (UINT_32 *)vp1; y2 = (UINT_32 *)pv2;
} [/INST] The error is Cast on volatile value. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_345(FLOAT_32 fl1)
{ UINT_8 bitmap = ~fl1;
} [/INST] The error is Bit operator with floating point operand. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef enum Range
{ first, second, third
} Range;
typedef struct Message
{ UINT_32 ui_set:0x4; UCHAR uc_set:0x1; SINT_32 si_set:0x4; FLOAT_32 y_set:0x8; Range z_set:0x2;
} Message;
void static_346(void)
{ Message message_chunk;
} [/INST] The error is Bit field is not unsigned integral or enum type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define PENALTY_MACRO (XIN, YIN) ((XIN) * (YIN))
#define GOOD_MACRO(XIN, YIN) ((XIN) + (YIN))
const SINT_32 s1 = 42;
const SINT_32 s2 = 7;
SINT_32 static_347(void)
{ SINT_32 myInt = GOOD_MACRO( s1, s2); return myInt;
} [/INST] The error is Macro parameter list has leading space. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
static void static_348( void )
{ UCHAR * uc = NULL; if( uc == 0 ) { ; }
} [/INST] The error is Use of the NULL macro. </s>"
"<s>[INST] find the error in this code: typedef enum Seasons
{ SPRING, summer, autumn, winter
} Seasons;
static void static_349(Seasons season)
{
} [/INST] The error is Enumeration is not all lower case. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_31 (void)
{ SINT_32 i=10 ; while (i > -1) { if (i == 0) { break; } i = i - 1; }
} [/INST] The error is Use of break statement in loop. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const UINT_32 DEFINT = 1U;
void static_350(void)
{ UINT_32 my_int = DEFINT;
} [/INST] The error is Const variable is not all lower case. </s>"
"<s>[INST] find the error in this code: void static_351(void)
{ enum { up, down } direction;
} [/INST] The error is Type declaration with variable definition. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef enum Seasons
{ spring, summer, autumn, winter
} Seasons;
Seasons static_352 (INT_32 month)
{ Seasons ss; return ss;
} [/INST] The error is Declaration of type not in header file. </s>"
"<s>[INST] find the error in this code: #ifndef STATIC_354_H
#define STATIC_354_H
#include ""c_standards.h""
extern UINT_32 day;
#endif
#include ""Static_354.h""
UINT_32 day = 1U;
extern UINT_32 season;
static void static_354 (void)
{
} [/INST] The error is Extern declaration is not in header file. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_355(void)
{ UINT_32 s12345678901234567890123456789012345678901234567890123456789012_a; UINT_32 s12345678901234567890123456789012345678901234567890123456789012_b;
} [/INST] The error is Variables not unique within *** characters. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_356(void)
{ UINT_32* uptr[10]; UINT_32 **upp; upp = uptr;
} [/INST] The error is Pointer to pointer declared. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
extern incompatible_int;
UCHAR incompatible_int = '0';
void static_360 (void)
{
} [/INST] The error is Incompatible type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
SINT_32 static_361(SINT_32 x1, SINT_32 x2, SINT_32 x3)
{ SINT_32 z1; z1 = z1 * x2 >> 3U; z1 = x1 * x2 + x3; z1 = x1 * x2++; z1 = x1 + x2 - x3; z1 = x1 + x2 + x3; return z1;
} [/INST] The error is Expression needs brackets. </s>"
"<s>[INST] find the error in this code: typedef enum mask_enum_type
{ mask_first = 0x01, mask_all = 0xFF
} mask_enum_type; [/INST] The error is Hexadecimal number with upper case char. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_32 ( SINT_32 p_1)
{ SINT_32 i = p_1; SINT_32 x = 0; while ( i != 0 ) { i--; if ( x == 0 ) { continue; } }
} [/INST] The error is Use of continue statement. </s>"
"<s>[INST] find the error in this code: #include <stdio.h>
void static_366 (void)
{ printf(""This is quite a long text string that\
spans several lines\n"");
} [/INST] The error is String continuation - use of \. </s>"
"<s>[INST] find the error in this code: #define S1(X) (\
(X) + ((X) * 2))
void static_367 ( void )
{ ;
} [/INST] The error is Macro continuation - use of \. </s>"
"<s>[INST] find the error in this code: #pragma This is just an example using \ to continue a pragma.
#pragma Another example ""using"" \ but with a string before it! [/INST] The error is Pragma continuation - use of \. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_369(void)
{ UINT_32 my_over_sixty_characters_long_non_compliant_integer_type_instance;
} [/INST] The error is Name found with length greater than ***. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const UINT_32 top_value = 255U;
void static_370(UINT_32 a1, UINT_32 a2, UINT_32 a3)
{ if (a1 > a3) { if (a1 > a2) { if (a2 > a3) { if (a2 < top_value) { if (a1 > top_value) { } } } } }
} [/INST] The error is If nest depth greater than ***. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const UINT_32 x1 = 5U;
const UINT_32 x2 = 3U;
void call(UINT_32 a1, UINT_32 a2)
{ if (a1 > a2) { }
}
void static_371 (void)
{ call(x1,x2);
} [/INST] The error is No space after comma in parameter list. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_372(INT_32* my_int_ptr)
{ ;
} [/INST] The error is * or & not attached to name in declaration. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_373(void)
{ const INT_32 x1 = -5; const INT_32 x2 = 3; INT_32 b1 = x1 / x2;
} [/INST] The error is Use of integer division. </s>"
"<s>[INST] find the error in this code: typedef unsigned int unique_type;
void static_374( void )
{ unique_type unique_type;
} [/INST] The error is Name conflict with typedef. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_376(void)
{ CHAR octal_escape, n_octal_escape; n_octal_escape = '\01'; n_octal_escape = '\109'; octal_escape = '\0';
} [/INST] The error is Use of octal escape sequence. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_33( UINT_32 p_1 )
{ UINT_32 val0 = 0u; UINT_32 val1 = 1u; UINT_32 result; result = ( p_1 == 0u ) ? val0 : val1 ;
} [/INST] The error is Use of ternary operator found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_377(void)
{ CHAR * n_octal_point = ""abc\017"";
} [/INST] The error is Null character used within a string. </s>"
"<s>[INST] find the error in this code: typedef enum my_enum
{ first, second, third
} seq_enum;
void static_378 ( seq_enum pos )
{
} [/INST] The error is Tag and type mismatch in struct/union/enum. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const SINT_32 m1 = 4;
const SINT_32 m2 = 3;
#define MIN(a, b) ((a) \ < \ (b) \ ? (a) \ : (b) \ )
void static_379(void)
{ SINT_32 res = MIN(m1, m2);
} [/INST] The error is Macro exceeds *** continuation lines. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef enum my_enum
{ first, second, third
} my_enum;
void static_380(void)
{ enum my_enum pos;
} [/INST] The error is Enumeration element not on a new line. </s>"
"<s>[INST] find the error in this code: enum my_enum
{ first, second, third
};
void static_381(void)
{ enum my_enum pos;
} [/INST] The error is Enum, struct or union not typedeffed. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 my_const = 42U;
UINT_32 a_fn(UINT_32 us1)
{ return us1;
}
void static_382(void)
{ a_fn(my_const); (void)a_fn(my_const);
} [/INST] The error is (void) missing for discarded return value. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define X2(X) ((X) + (X))
UINT_32 X2;
UINT_32 static_383(UINT_32 us1)
{ return us1;
} [/INST] The error is Identifier name matches macro name. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define ABCDEFGHIJKLMNOPQRSTUVWXYZ1234_M(X) ((X) + (X))
#define ABCDEFGHIJKLMNOPQRSTUVWXYZZYXWVUTSRQPONMLKJIHGFEDCBA12345678987_M(X) ((X) + (X))
UINT_32 ABCDEFGHIJKLMNOPQRSTUVWXYZ1234_V;
UINT_32 ABCDEFGHIJKLMNOPQRSTUVWXYZZYXWVUTSRQPONMLKJIHGFEDCBA12345678987_V;
static UINT_32 static_384(UINT_32 us1)
{ return us1;
} [/INST] The error is Identifier matches macro name up to max significant chars. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef enum FavouriteSeasons
{ spring, summer, autumn, winter
} FavouriteSeasons;
FavouriteSeasons season;
UINT_32 x1;
void static_385(void)
{ switch (season) { UINT_32 decl_b4_1st_case; case spring: x1 = 1U; break; case summer: x1 = 4U; break; case autumn: x1 = 7U; break; case winter: x1 = 10U; break; default: break; }
} [/INST] The error is MISRA switch statement syntax violation. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(void)
{
}
void static_386(UINT_32 p1)
{ foo();
} [/INST] The error is Less than *** blank lines separating procs. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
BOOL isHexDigit( CHAR Hex )
{ BOOL bResult = FALSE; if ((Hex == '0') || (Hex == '1') || (Hex == '2') || (Hex == '3') || (Hex == '4') || (Hex == '5') || (Hex == '6') || (Hex == '7') || (Hex == '8') || (Hex == '9') || (Hex == 'A') || (Hex == 'a') || (Hex == 'B') || (Hex == 'b') || (Hex == 'C') || (Hex == 'c') || (Hex == 'D') || (Hex == 'd') || (Hex == 'E') || (Hex == 'e') || (Hex == 'F') || (Hex == 'f')) { bResult = TRUE; } return bResult;
} [/INST] The error is Cyclomatic complexity greater than ***. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 static_34();
UINT_32 static_34(UINT_32 p)
{ return p;
} [/INST] The error is No parameters declared in proc specification. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 s4 = 4U;
typedef enum FavouriteSeasons
{ spring = 1, summer = 2, autumn = 3, winter = s4
} FavouriteSeasons;
FavouriteSeasons season;
UINT_32 x1;
void static_387(void)
{ switch (season) { case spring: x1 = 1U; break; case summer: x1 = 4U; break; case autumn: x1 = 7U; break; case winter: x1 = 10U; break; default: break; }
} [/INST] The error is Enum init not integer-constant-expression. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const UINT_32 limit = 99U;
void static_388(void)
{ extern UINT_32 x1; if (limit == x1) { }
} [/INST] The error is Extern used in function body. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef enum Bool
{ false, true
} Bool;
const UINT_32 limit = 99U;
void static_389(UINT_32 x1)
{ Bool b1 = false; if (limit == x1) { b1++; }
} [/INST] The error is Bool value incremented/decremented. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef CHAR arraytype[20];
static void static_390(void )
{ ;
} [/INST] The error is Typedef array declaration. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_397 (void)
{ INT_32 my_array[3] = { 1, 2 }; INT_32 array2[2][2] = { {0}, {1,2} }; CHAR char_10[10] = ""Hello"";
} [/INST] The error is Array initialisation has insufficient items. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_398(void)
{ UINT_32 lowertest1, test; if (!(lowertest1 <= test)) { ; } if (lowertest1 > test) { ; }
} [/INST] The error is Boolean negation outside bracketed exprsn. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_399(SINT_32 p1);
void static_399(SINT_32 p1);
void static_399(UINT_32 p1);
UINT_32 static_399(SINT_32 p1); [/INST] The error is Function declared more than once. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct My_struct
{ UINT_16 x1; UINT_16 x2;
};
UINT_32 static_400( void )
{ return sizeof(struct My_struct);
} [/INST] The error is Use of sizeof on a type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_401(CHAR str[])
{ UINT_32 sz = sizeof(str);
} [/INST] The error is Use of sizeof on an array parameter. </s>"
"<s>[INST] find the error in this code: typedef enum Bool
{ false, true
} Bool;
void static_402(Bool b1)
{ Bool b2 = true; if (b1 == b2) { }
} [/INST] The error is Comparison of booleans. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static BOOL static_35(UINT_32 p_1)
{ BOOL ret = ( p_1 == 1U ); return ret;
} [/INST] The error is Static procedure is not explicitly called in code analysed. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_403( INT_32 si )
{ UINT_32 my_var = 2U; const INT_32 s1 = -2; my_var = my_var << -1; my_var = my_var >> s1; my_var = my_var >> si;
} [/INST] The error is Negative (or potentially negative) shift. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_404(void)
{ INT_32 my_array[3] = { 1, 2, 3, 4 }; char char3[3] = ""abcd""; char char4[4] = ""abcd""; char char5[5] = ""abcd"";
} [/INST] The error is Array initialisation has too many items. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define MY_MACRO(X) ((X) * (MY_MACRO((X) + 1)))
void static_405 ( void )
{ INT_32 v = MY_MACRO(3);
} [/INST] The error is Macro name appears in own replacement list. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const UINT_32 max_num = 10U;
void static_406(BOOL is_high, UINT_32 p1)
{ if (is_high && (max_num == p1++)) { }
} [/INST] The error is Use of ++ or -- on RHS of && or || operator. </s>"
"<s>[INST] find the error in this code: #include <stdlib.h>
void static_407(void)
{ char *str = ""abcde""; free(str);
} [/INST] The error is free used on string. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const UINT_32 max_num = 10;
void static_408(BOOL is_high, UINT_32 p1)
{ volatile UINT_32 v1; if (is_high && (max_num == v1)) { }
} [/INST] The error is Volatile variable accessed on RHS of && or ||. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
const INT_32 max_num = 10;
void static_409( char arr[] )
{ INT_32 sub; for (sub = 0; sub < max_num; sub++) { if (arr[sub] == '\0') { break; } (void) printf(""%c"", arr[sub]); if (arr[sub] == 'z') { break; } }
} [/INST] The error is More than one break or goto statement in loop. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef enum FavouriteSeasons
{ spring, summer, autumn, winter
} FavouriteSeasons;
FavouriteSeasons season;
UINT_32 x1;
void static_410( void )
{ switch (season) { case spring: x1 = 1U; break; case summer: x1 = 4U; break; case autumn: x1 = 7U; break; case winter: x1 = 10U; break; default: break; }
} [/INST] The error is Switch empty default has no comment (MR). </s>"
"<s>[INST] find the error in this code: typedef enum Seasons
{ spring = 1, summer, autumn, winter
} Seasons;
void static_411(void)
{ Seasons season = winter; season++;
} [/INST] The error is Inappropriate value assigned to enum. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
enum Seasons
{ spring, summer, autumn, winter
};
void static_413(void)
{ ;
} [/INST] The error is User type declared but not used in code analysed. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 static_36 ( UINT_32 p_1 )
{ UINT_32 y = p_1;
}
int main ( void )
{ UINT_32 x = 1; static_36( x );
} [/INST] The error is Function has no return statement. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
const INT_32 max_num = 10;
void static_415(char arr[10])
{ INT_32 sub; for (sub = 0; sub < max_num; sub++) { if (arr[sub] == '\0') { break; } (void) printf(""%c"", arr[sub]); }
} [/INST] The error is Single dimension array param size specified. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
const INT_32 max_num = 10;
void static_416(char arr[10][2])
{ INT_32 sub; for (sub = 0; sub < max_num; sub++) { if (arr[sub][0] == '\0') { break; } (void) printf(""%c"", arr[sub][0]); }
} [/INST] The error is First array param dimension specified. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define DEBUG1 1
#if DEBUG1
const UINT_32 init = 1U;
#else
const UINT_32 init = 0;
#endif
void static_417(void)
{
} [/INST] The error is Use of #if preprocessor command. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef UINT_32* My_ptr, Value;
void static_422 (My_ptr ptr, Value val)
{
} [/INST] The error is More than one synonym in typedef. </s>"
"<s>[INST] find the error in this code: typedef float Float_32;
typedef double Float_64;
void static_425(void)
{ Float_32 my_floata = 3.5F; Float_64 my_double = 4.5; Float_32 my_floatb = 2.5; Float_32 my_floatc = 6;
} [/INST] The error is float literal with no F suffix. </s>"
"<s>[INST] find the error in this code: #define AA 1
#undef BB
static void static_426 (void)
{
#define BB 2
#undef CC
} [/INST] The error is #undef used in a block. </s>"
"<s>[INST] find the error in this code: #define MYFILE ""myfile.h""
#include MYFILE
#include filename.h
static void static_427(void)
{
} [/INST] The error is Filename in #include not in < > or "" "". </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef enum Seasons
{ spring, summer, autumn, winter
} Seasons;
void static_428(Seasons season)
{ UINT_16 weather_score; switch (season) case spring: { weather_score = 1U; break; } case summer: { weather_score = 3U; break; } case autumn: { weather_score = 2U; break; } case winter: { weather_score = 0U; break; } default: { weather_score = 0U; break; }
} [/INST] The error is No {} for switch (added by Testbed). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_429( void )
{ UINT_32 index; for (index = 0; ; index++) { }
} [/INST] The error is Empty middle expression in for loop. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
const SINT_32 max_ind = 10;
void static_430 (void)
{ for (SINT_32 index = 0; index < max_ind; printf(""index = %d\n"", index)) { index = index + 2; }
} [/INST] The error is Inconsistent usage of loop control variable. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_37 ( UINT_32 );
void static_37 ( UINT_32 )
{ ;
} [/INST] The error is Procedure parameter has a type but no identifier. </s>"
"<s>[INST] find the error in this code: void static_433(long s64)
{ int s32; bool bl = 5; s32 = bl; char ch = s64; ch = ch + 1; ch = 0; ch = 0xf; ch = (short) s32;
} [/INST] The error is Type conversion without cast. </s>"
"<s>[INST] find the error in this code: typedef signed char SINT_8;
typedef signed int SINT_32;
typedef unsigned int UINT_32;
void static_434(SINT_8 s8, FLOAT_32 f32)
{ UINT_32 u32; SINT_32 s32; u32 = 4; u32 = 3L; s32 = u32; s32 = 4U; u32 = s32 + u32; u32 = 4 + u32; u32 = (SINT_32)f32;
} [/INST] The error is Signed/unsigned conversion without cast. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_435(FLOAT_32 ff, SINT_8 s8, FLOAT_64 f64)
{ FLOAT_32 f32; SINT_32 s32; s32 = ff; f32 = s32; f32 = s8; f32 = 4; f32 = 4 + ff; f32 = 0; f32 = (SINT_32)f64;
} [/INST] The error is Float/integer conversion without cast. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_436 (INT_8 * ptr, INT_8 arr[10])
{ INT_8 * p1 = ptr; INT_8 * p2 = arr; ptr[5] = 0; p1[5] = 0; p2[5] = 0;
} [/INST] The error is Declaration does not specify an array. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_437(void)
{ INT_32 ss1[10]; INT_32 ss2[10]; INT_32 *ss1_ptr = &ss1[0]; INT_32 *ss2_ptr = &ss2[0]; if (ss1_ptr > ss2_ptr) { }
} [/INST] The error is < > <= >= used on different object pointers. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_438(void)
{ SINT_32 ss1[10]; SINT_32 ss2[10]; SINT_32 *ss1_ptr = &ss1[0]; SINT_32 *ss2_ptr = &ss2[0]; SINT_32 ss3 = ss1_ptr - ss2_ptr;
} [/INST] The error is Pointer subtraction not addressing one array. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_439 (INT_32 *ss_ptr)
{ INT_32 ss = (INT_32)ss_ptr;
} [/INST] The error is Cast from pointer to integral type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_440(INT_32 ss)
{ INT_32 *ss_ptr = (INT_32 *)ss; ss_ptr = (INT_32 *)0x8ff7ffff;
} [/INST] The error is Cast from integral type to pointer. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_441( void )
{ UINT_16 u16r; CHAR chr; FLOAT_32 f32a, f32b; u16r = (UINT_16)(f32a + f32b); u16r = (UINT_16)(f32a); chr = (CHAR)(f32a);
} [/INST] The error is Float cast to non-float. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_442( void )
{ UINT_32 u32; INT_32 s32a, s32b; u32 = (UINT_32)(s32a + s32b); u32 = (UINT_32)(s32a);
} [/INST] The error is Signed integral type cast to unsigned. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_39( void )
{ FLOAT_32 f = 0.0F; for ( f = 0.0F; f < 10.0F; f = f + 1.0F ) { ; }
} [/INST] The error is Unsuitable type for loop variable. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_443( void )
{ INT_32 s32; UINT_32 u32a, u32b; s32 = (INT_32)(u32a + u32b); s32 = (INT_32)(u32a);
} [/INST] The error is Unsigned integral type cast to signed. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_444( SINT_8 s8a, SINT_8 s8b, SINT_64 s64a, SINT_64 s64b )
{ FLOAT_32 f32 = (FLOAT_32)( s64a + s64b ); FLOAT_32 f32 = (FLOAT_32)( s8a + s8b ); char ch = ( char )(s64a + s64b); ch = ( char ) s64a;
} [/INST] The error is Integral type cast to non-integral. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_445( void )
{ FLOAT_32 f32; FLOAT_64 f64a, f64b; f32 = f64a + f64b; f32 = ( FLOAT_64 )f32;
} [/INST] The error is Narrower float conversion without cast. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_446 ( void )
{ UINT_16 u16; UINT_32 u32a, u32b; u16 = u32a + u32b; u16 = 3U; u16 = 3UL; u16 = (UINT_32)u16;
} [/INST] The error is Narrower int conversion without cast. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const INT_32 max_ind = 10;
INT_32 flag = 1;
static void static_447(void)
{ for (INT_32 index = 0; (index < max_ind) && (flag > 0); index++) { }
} [/INST] The error is Loop termination not a simple constant test. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_450(void)
{ CHAR *text = L""Wide string """"and string"";
} [/INST] The error is Wide string and string concatenated. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_451( void )
{ FLOAT_64 f64; FLOAT_32 f32a, f32b; f64 = f32a + f32b; u64a = u32a++;
} [/INST] The error is No cast for widening complex float expression (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_452(void)
{ UINT_64 u64a; UINT_32 u32a, u32b; u64a = u32a + u32b; u64a = u32a++;
} [/INST] The error is No cast for widening complex int expression (MR). </s>"
"<s>[INST] find the error in this code: typedef float Float_32;
typedef double Float_64;
Float_64 static_456( void )
{ Float_32 f32a; return (f32a);
} [/INST] The error is Implicit float widening for function return (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_16 static_457(void)
{ UINT_8 u8a; return u8a;
} [/INST] The error is Implicit int widening for function return (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 global_f = 0;
SINT_32 loop_standards (SINT_32 p_1)
{ SINT_32 j = 10; for (global_f = 0; global_f < 10; global_f = global_f + 1) { j--; } return j;
} [/INST] The error is Loop index is not declared locally. </s>"
"<s>[INST] find the error in this code: typedef unsigned int Uint_32;
typedef unsigned long Uint_64;
static void narrow_int(Uint_32 u32b)
{ ;
}
static void static_458(void)
{ Uint_64 u64a; narrow_int(u64a);
} [/INST] The error is Implicit conversion: actual to formal param (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void foo(UINT_32 *uptr)
{
}
void static_459(void)
{ UINT_32 uarray[10]; foo(uarray);
} [/INST] The error is Array passed as actual parameter. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
extern UINT_8 x;
static UINT_8 x = 0u;
static void static_461(void)
{
} [/INST] The error is Identifier with ambiguous linkage. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef struct MyStruct
{ UINT_32 x1; UINT_32 x2; UINT_32 x3;
} MyStruct;
void static_462(void)
{ MyStruct a_struct = {1, 2}; MyStruct b_struct = {0};
} [/INST] The error is Struct initialisation has insufficient items. </s>"
"<s>[INST] find the error in this code: static struct { char * string; int anint; } types [] = { { ""one green bottle"",1}, { ""two green bottles"",2}, { ""three green bottles"",3}, };
static void static_463( void )
{ ;
} [/INST] The error is Unnecessary comma in initialisation list. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
auto UINT_32 glob_var;
static void static_464(void)
{ UINT_32 r1; auto UINT_32 local_var;
} [/INST] The error is Use of auto specifier. </s>"
"<s>[INST] find the error in this code: struct static_465_s;
void static_465(void)
{
} [/INST] The error is Struct/union not completely specified. </s>"
"<s>[INST] find the error in this code: typedef signed long Sint_64;
typedef unsigned long Uint_64;
const Sint_64 slong = 1;
const Sint_64 slong_ok = 1L;
const Uint_64 ulong = 2U;
const Uint_64 ulong_ok = 2UL;
void static_466 (void)
{
} [/INST] The error is long literal with no L suffix. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 static_471 (void)
{ return 42;
} [/INST] The error is Function returns constant value. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_472(void);
void static_472(void)
{ char * entry_name = ""Anon.""; INT_32 entry_number = 0;
} [/INST] The error is No comment after declaration. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdarg.h>
void static_41(UCHAR* p_1, ...);
void static_41(UCHAR* p_1, ...)
{ va_list ap; UCHAR* t; va_start(ap, p_1); t = va_arg(ap, UCHAR*); va_end(ap);
} [/INST] The error is Ellipsis used in procedure parameter list. </s>"
"<s>[INST] find the error in this code: #include <string.h>
#define STRING_BUFFER_LENGTH 256
typedef struct
{ int stringSize; char stringBuffer[STRING_BUFFER_LENGTH];
} sized_string;
struct another_string
{ int stringLength; char stringContainer[STRING_BUFFER_LENGTH];
};
void static_473(void)
{ sized_string myString; struct another_string myContainer; myContainer.stringLength = myString.stringSize; memcpy(myContainer.stringContainer, myString.stringBuffer, myContainer.stringLength);
} [/INST] The error is Typedef should not be used. </s>"
"<s>[INST] find the error in this code: typedef enum Bool
{ FALSE, TRUE
} Bool;
typedef enum MyEnum
{ First, Second, THIRD
} MyEnum;
void static_474(MyEnum ee)
{ Bool top_two = FALSE; if (ee == First) { top_two = TRUE; } else { if (ee == Second) { top_two = TRUE; } else { top_two = FALSE; } }
} [/INST] The error is Enum name is not all upper case. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define IN
SINT_32 static_475(IN SINT_32 si);
SINT_32 static_475(SINT_32 si)
{ return si;
} [/INST] The error is Parameter needs IN/OUT/INOUT marker. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_476(INT_32 si)
{ UINT_32 my_array[3] = {0, 0, 0}; UINT_32 element = my_array[si];
} [/INST] The error is Array index not unsigned. </s>"
"<s>[INST] find the error in this code: typedef enum Pos
{ FIRST, SECOND, THIRD
} Pos;
typedef enum Bool
{ FALSE, TRUE
} Bool;
Bool foo(const Pos xx);
Bool foo(const Pos xx)
{ Bool top_two; if (xx == FIRST) { top_two = TRUE; } else if (xx == SECOND) { top_two = TRUE; } else { ; } return top_two;
} [/INST] The error is Empty else clause following else if. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define isillegal 11
SINT_32 total = 12;
SINT_32 static_478(SINT_32 p1)
{ SINT_32 result = total + (p1 * isillegal); return result;
} [/INST] The error is Name starts with ISO reserved prefix (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_479(void)
{ UINT_8 ss = 15U; UINT_8 res; res = ss >> 4U;
} [/INST] The error is Right shift loses all bits. </s>"
"<s>[INST] find the error in this code: #include <string.h>
void static_480(void)
{ char str[] = {""ABCDEFGHIJKLMNOPQRSTUVWXYZ""}; (void)memcpy(&str[10], &str[13], 6U);
} [/INST] The error is String function params access same variable. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_481 ( void )
{ struct static_481_tag { INT_16 a; INT_16 b [ ]; }; struct static_481_tag static_481_st = { 1, { 2, 3, 4 } };
} [/INST] The error is Array with no bounds in struct. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
extern struct st *pst1;
extern struct st *pst2;
void static_482 ( void )
{ pst2 = pst1; *pst2 = *pst1;
} [/INST] The error is Incomplete structure referenced. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct bitfield1 {UINT_32 x:1;};
void static_42(void)
{
} [/INST] The error is Use of bit field in structure declaration. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
struct S
{ UINT_32 ac; UINT_32 bc;
};
void static_483 ( void )
{ UINT_32 ic; UINT_32 *jc; struct S *sptr; sptr = (struct S*)malloc(sizeof(struct S)); jc = &ic; free(jc); free(sptr);
} [/INST] The error is Freed parameter is not heap item. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
struct S
{ UINT_32 ac; UINT_32 bc;
};
void static_484 ( void )
{ UINT_32 ic; struct S *sptr; sptr = (struct S*)malloc(sizeof(struct S)); free(sptr); ic = sptr->ac;
} [/INST] The error is Attempt to use already freed object. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
void static_486 ( char * my_string )
{ printf ( my_string ); printf ( ""My string is %s"", my_string );
} [/INST] The error is Incorrect number of formats in output function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
struct S
{ UINT_32 ac; UINT_32 bc; CHAR cc[100];
};
static void static_487 ( void )
{ UINT_32 tt; struct S *sptr; sptr = (struct S*)malloc(sizeof(sptr)); sptr->ac = 0U; sptr->bc = 0U; tt = sptr->bc; free(sptr);
} [/INST] The error is Insufficient space allocated. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_488 ( void )
{ SCHAR s8a = 1; SCHAR s8b = 1; s8a = s8a + 126; s8b = s8b + 150;
} [/INST] The error is Value outside range of underlying type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <string.h>
void static_489 ( void )
{ char source[200]; char destination[100]; strncpy( destination, source, 200 ); char arr_string[10] = {'a', 'b', 'c'}; char arr_dest[5]; strncpy( arr_dest, arr_string, 5 );
} [/INST] The error is Insufficient space for operation. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
extern void helper64( FLOAT_64 h1 );
extern void helper32( FLOAT_32 h2 );
void static_490( void )
{ FLOAT_32 s1; helper32(s1); helper64((FLOAT_64)s1); helper64(s1);
} [/INST] The error is No cast for widening float parameter. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
extern void helper32( UINT_32 h1 );
extern void helper16( UINT_16 h2 );
void static_491( void )
{ UINT_16 s1; helper16(s1); helper32((UINT_32)s1); helper32(s1);
} [/INST] The error is No cast for widening int parameter. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_492( UINT_32 p1, UINT_32 p2, UINT_32 p3, UINT_32 p4 )
{
} [/INST] The error is Parameter not declared on new line. </s>"
"<s>[INST] find the error in this code: #include <setjmp.h>
#include ""c_standards.h""
jmp_buf env;
void static_43 (SINT_32 val)
{ longjmp(env,val);
} [/INST] The error is Use of setjmp/longjmp. </s>"
"<s>[INST] find the error in this code: short s16a, s16b;
s16a + s16b;
3U + s16a;
unsigned char u8a, u8b;
u8a + u8b;
typedef int SIGNED_INT_16;
typedef long SIGNED_LONG_32;
static void static_493( void )
{ SIGNED_INT_16 s16 = 32767; SIGNED_LONG_32 s32; s32 = s16 + 1;
} [/INST] The error is Numeric overflow. </s>"
"<s>[INST] find the error in this code: typedef unsigned int uint32_t;
typedef int Boolean;
typedef unsigned short my_uint;
typedef uint32_t my_counter;
static void static_495( void )
{ my_uint local_var;
} [/INST] The error is Typedef name has no size indication. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_496( void )
{ UINT_32 my_local = 42U; static_496_helper();
}
static void static_496_helper( SINT_16 p1 )
{
} [/INST] The error is Function call with no prior declaration. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_497( void )
{ struct st s1;
} [/INST] The error is Type is incomplete in translation unit. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_509( const UINT_32 p1 )
{ UINT_32 xx = 0;
lab1: xx++; if ( p1 > xx ) { goto lab2; } else { goto lab1; }
lab2: xx++;
} [/INST] The error is goto label is backwards. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define MAX_SIZE 10U
void static_510( void )
{ for ( UINT_32 loop_var = 1U; loop_var != MAX_SIZE; loop_var +=2U ) { ; }
} [/INST] The error is Loop counter increment and operator defect. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define MAX_SIZE 512
void static_511( UINT_32 p1 )
{ UINT_32 local = 0U; UINT_32 action = 0U; goto lab1; for(local; local < MAX_SIZE; local++) {
lab1: action += p1; }
} [/INST] The error is Jump into nested block. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct S { int xx : 2; };
void static_520( void )
{ struct S st;
} [/INST] The error is Bit field is not bool or explicit integral. </s>"
"<s>[INST] find the error in this code: #include <stdlib.h>
#include ""c_standards.h""
static void static_530( void );
static void static_530( void )
{ UINT_32 xx = 0; if( xx == NULL ){;}
} [/INST] The error is NULL used in integer context. </s>"
"<s>[INST] find the error in this code: #include <stdlib.h>
#include ""c_standards.h""
static void static_531( void )
{ UINT_32 * pxx = NULL ; UINT_32 * pxy = ( 4 - 4 ); if( pxx == 0 ) {;}
} [/INST] The error is Literal zero used in pointer context. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdarg.h>
void static_44( CHAR* p_1,...)
{ va_list ap; CHAR* t; va_start(ap, p_1); t = va_arg(ap, CHAR*); va_end(ap);
} [/INST] The error is Use of banned function, type or variable. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef enum { aa, bb } enum_536;
struct tag
{ enum_536 a:4;
};
void static_536( void )
{ ;
} [/INST] The error is Enum type in bit field. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static UINT_32 test ( UINT_32 *v ) { *v = *v + 1U; return ( *v < 10U ); }
static void static_537( void )
{ UINT_32 bool_a = FALSE; UINT_32 x; for ( x = 0U; ( x < 10U ) && test ( & bool_a ); ++x ) { ; }
} [/INST] The error is Extra loop control variable changed. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_542 ( void )
{ INT_32 x = 0; INT_32 y = 0; for (x = 0; (x < 10) && (y != 21); x++, y++) { ; }
} [/INST] The error is Extra loop control variable is not bool. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_550( void )
{ UINT_32 xx; xx = 0x8ff7ffff ;
} [/INST] The error is Unsuffixed hex or octal is unsigned, add U. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_553( void );
void static_553( void )
{ ;
} [/INST] The error is Function and proto should both be static. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct tag1
{ UINT_16 u16;
};
struct tag2
{ UINT_32 u32;
};
static void static_554( void )
{ signed char *pc8; struct tag1 *st1; struct tag2 *st2; st2 = (struct tag2 *)(st1); (void)st1; pc8 = (signed char*)st1;
} [/INST] The error is Cast to an unrelated type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_16 global = 0U;
UINT_16 init_glob( UINT_16 ui )
{ global = ui; return ui;
}
static void static_560( void )
{ UINT_16 us; UINT_16 usx = init_glob(3U); if( global > 1U ) { us = 78U; usx = 0U; }
} [/INST] The error is Scope of variable could be reduced. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_562( void );
#define MAC( x ) x + 10
static void static_562( void )
{ INT_16 aa = 1; MAC ( aa++ );
} [/INST] The error is Use of ++,-- or = in macro parameters. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct tag
{ UCHAR ff;
};
struct tag *uglob;
static void static_565( void )
{ static struct tag avar; uglob = & avar;
} [/INST] The error is Assignment to wider scope. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_567( UINT_32 * pp );
static void static_567( UINT_32 * pp )
{ UINT_32 * xx; xx = pp +7;
} [/INST] The error is Pointer arithmetic is not on array. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_5(void)
{ UINT_32 value_x = 1u; if (value_x == 0u) {
#if FALSE value_x = value_x + 1u;
#endif } if (value_x == 0u) {;}
} [/INST] The error is Empty then clause. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_45(void)
{ UINT_32 public = 0; UINT_32 private = 0; UINT_32 protected = 0; UINT_32 operator = 0; UINT_32 new = 0; UINT_32 template = 0; UINT_32 virtual = 0; UINT_32 delete = 0; UINT_32 friend = 0; UINT_32 cout = 0; UINT_32 cin = 0; UINT_32 endl = 0;
} [/INST] The error is Use of C++ keyword. </s>"
"<s>[INST] find the error in this code: void static_568( void )
{
#include ""stdlib.h""
} [/INST] The error is #include ""filename"" uses standard library name. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_572( void );
static void static_572( void )
{ UCHAR xx = 99; assert( xx = 91);
} [/INST] The error is Side effect in assert. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define makename(uc1, uc2, uc3, uc4) uc1##uc2##uc3##uc4
static void static_573( void )
{ makename ( \U00010401, \U00010401, \U00010401, \U00010402 ) = 4;
} [/INST] The error is Macro concatenation of uni char names. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_575( void );
static INT_32 DCL36_i2 = 20;
INT_32 DCL36_i2;
static void static_575( void )
{
} [/INST] The error is Linkage differs from previous declaration. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_576( void );
typedef void (*fptr1)(void);
typedef UCHAR (*fptr2)(UCHAR uc);
static void static_576( void )
{ fptr1 afp; fptr2 bfp; afp = bfp;
} [/INST] The error is Function pointer is of wrong type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_577( void );
UCHAR * puc;
static void static_577( void )
{ UCHAR xx; xx = sizeof(puc) ;
} [/INST] The error is Sizeof argument is a pointer. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_578( void );
UCHAR xx;
static void static_578( void )
{ xx = sizeof(xx) + 10U;
} [/INST] The error is Sizeof used in arithmetic expression. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct astr { UCHAR f1; SCHAR f2;
} okstr1,notokstr2;
struct astr okstruct1;
struct astr okstruct2,notokstruct1;
UCHAR global_ok1;
UCHAR global_ok2,gobal_notok1;
static void static_579( void )
{ UINT_32 local_ok1; UINT_32 localnok_ok1, localnot_ok2;
} [/INST] The error is More than one variable per declaration. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define WHAT static
#define WHAT volatile
INT_16 xx = 9;
#define OK static
#undef OK
#define OK static
static void static_580( void )
{ ;
} [/INST] The error is Macro redefinition without using #undef. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_581( void );
INT_32 endcond ( void )
{ return 1;
}
static void static_581( void )
{ INT_32 ii = 0; INT_32 data[10]; INT_32 end = 0; for ( ii=0; ( ii < 10 ) || ( !end ) ; ii++ ) { data[ii] = ii; if ( endcond() != 0 ) { end = 1; } }
} [/INST] The error is Loop conditions are independent. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_582( const UINT_16 * par1 )
{ const char * str; str = ""ok""; *str = 'A'; *(str + 1) = 'B'; str = ""ABC""; *par1 = 78U;
} [/INST] The error is const object reassigned. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_583( void );
static void static_583( void )
{ CHAR * str; str = ""def"" ; if ( str == ""def"" ) { }
} [/INST] The error is Comparison of pointer and string literal. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_584( void );
INT_16 ss = 0;
static void static_584( void )
{ INT_16 rem; rem = ss % 4;
} [/INST] The error is Remainder of % op could be negative. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
static void static_585( void );
typedef enum
{ shift = 2U, mask = 0x10U, part = 1U
} constants;
static void static_585( void )
{ UINT_32 a = ( getchar () == EOF ) ? 50U : 100U; volatile UINT_32 r; r = a + ( a << shift ) + part;
} [/INST] The error is Bitwise and arith operations on same data. </s>"
"<s>[INST] find the error in this code: #include <stdio.h>
static void static_586( void )
{ typedef signed long long long s_t; s_t s; if ( scanf ( ""%lld"" , & s ) != 1 ) { (void) printf ( ""*"" ); }
} [/INST] The error is Format is not %j for user defined type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_587( void );
static void static_587( void )
{ const INT_32 loc; loc = 0; INT_32 rr = loc;
} [/INST] The error is Const local variable not immediately initialised. </s>"
"<s>[INST] find the error in this code: #include <stdlib.h>
static void static_588( void );
static void static_588( void )
{ system("" wow"" );
} [/INST] The error is Use of system function. </s>"
"<s>[INST] find the error in this code: #include <stdio.h>
static void static_589( void )
{ int x = 7; float ff = 8.9F; unsigned u = 9U; char * ss = ""oh my"" ; (void) printf("" \n %d "", u); (void) printf("" \n %d "", ff); (void) printf("" \n %s "", x); (void) printf("" \n %d "", ss);
} [/INST] The error is Format is not appropriate type. </s>"
"<s>[INST] find the error in this code: #include <stdio.h>
static void static_590( void )
{ fopen(""afile1.h"" , ""wb+"" ); fopen(""afile2.h"" , ""c"" );
} [/INST] The error is Mode fault in fopen. </s>"
"<s>[INST] find the error in this code: #include <stdio.h>
static void static_591( void );
FILE file_f;
FILE file_g;
FILE * hptr;
FILE * iptr;
static void static_591( void )
{ hptr = fopen("" afile.h"" ,"" w"" ); iptr = hptr; file_f = *hptr; file_g = file_f;
} [/INST] The error is Inappropriate use of file pointer. </s>"
"<s>[INST] find the error in this code: #include ""Static_46.h""
void static_46(void)
{ undef_global = 1U;
} [/INST] The error is extern not in nominated include file. </s>"
"<s>[INST] find the error in this code: #include <stdio.h>
static void static_592( void );
static void static_592( void )
{ (void) remove("" afile.h"" ); (void) rename("" afile.h"" , ""bfile.h"" );
} [/INST] The error is Use of filename based functions. </s>"
"<s>[INST] find the error in this code: #include <stdio.h>
static void static_593( void );
static void static_593( void )
{ FILE *fptr = fopen("" afile.h"" ,"" r"" ); rewind(fptr);
} [/INST] The error is Use fseek() rather than rewind(). </s>"
"<s>[INST] find the error in this code: #include <stdio.h>
static void static_594( void );
static void static_594( void )
{ FILE *fptr = fopen("" afile.h"" ,"" w"" ); setbuf(fptr, NULL);
} [/INST] The error is Use setvbuf() rather than setbuf(). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 static_598( const UINT_32 val )
{ UINT_32 data[2]; 1U[data] = val; return 1U[data];
} [/INST] The error is Alternative array indexing used. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define a 77U
#define b 32U
UINT_32 arr[4]= { a | b, a || b, a && b, a & b }; [/INST] The error is Use of && or || in initialisation. </s>"
"<s>[INST] find the error in this code: #include <string.h>
#include ""c_standards.h""
void static_600( void )
{ SINT_32 xx; char arr [3] = { 'a', 'b', 'c' }; xx = strlen(arr);
} [/INST] The error is Argument of strlen is unterminated. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <string.h>
void STATIC_602 ( void )
{ char *token; char *path = ""/usr/bin:/bin:/sbin""; token = strtok ( path, "":"" ); while ( token = strtok ( 0, "":"" ) ) { ; }
} [/INST] The error is strtok may change the parse string. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
SINT_32 global;
void static_603 ( SINT_32 * ptr1, SINT_32 * const ptr2, SINT_32 * ptr3 )
{ *ptr1 = global; *ptr2 = global; ptr3 = &global;
} [/INST] The error is Parameter should be declared * const. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
enum { LIMIT = 100 };
#define ARRAY_SIZE 100
void static_604( void )
{ SINT_32 array_ok1[ARRAY_SIZE]; SINT_32 array_ok2[LIMIT]; SINT_32 array_nok[100]; SINT_32 *ptr = &array_ok1[0]; array_nok[99] = 3;
} [/INST] The error is Use of numeric literal as array bound/subscript. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_605(void)
{ long long llvar = 3LL;
} [/INST] The error is Use of long long. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_047(void)
{ SINT_32 array[5] = {0,0,0,0,0}; SINT_32 *ptr; array[5] = 1; ptr = &array[5]; ptr = &array[6];
} [/INST] The error is Array bound exceeded. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef INT_32 (* fptr) (INT_32 p);
void myProc(UINT_32 x)
{
}
void static_606 ( UINT_32 u, fptr fp )
{ fp = (fptr) & myProc; fp = (fptr) & u; fp = (fptr)0; (void) & myProc;
} [/INST] The error is Cast involving function pointer. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_607(void)
{ UINT_32 x = 1; if (!!(x == 1)) { x = 2; } else if (!!!(x == 2)) { x = 1; } if (!!!!(x == 1)) { x = 2; }
} [/INST] The error is Double negative found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_608( void )
{ INT_32 i = 3 u;
} [/INST] The error is Use of explicitly undefined language feature. </s>"
"<s>[INST] find the error in this code: #include <stdio.h>
#define DEBUG /##/
void static_609()
{ DEBUG comment on debug code (void)printf(""debug print"");
} [/INST] The error is Use of implicitly undefined language feature. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_610(void)
{ INT_16 x = 6;
label1: x = 0;
} [/INST] The error is Label is unused. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_611(BOOL test)
{ INT_32 x = 0; if (test) { x = 10; }
} [/INST] The error is Line splice used in // comment. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static INT_32 count = 1;
inline void static_612 (void)
{ count++;
} [/INST] The error is inline function should be declared static. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_613 (INT_32 * restrict p, const INT_32 *q )
{ *p = *q;
} [/INST] The error is Use of restrict keyword. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_614 ( INT_16 a [ static 20 ] )
{ ;
} [/INST] The error is Use of static keyword in array parameter. </s>"
"<s>[INST] find the error in this code: void static_615(int which)
{ void *x; union { int i; double d; } u; u.i = 1; x = which ? &u.i : &u.d;
} [/INST] The error is Conditional operator has incompatible types. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_48(SINT_32 p_1)
{ SINT_32 i = 0, j = 0; switch (p_1) { case 0: j = 0; break; case 1: j=i; break; }
} [/INST] The error is No default case in switch statement. </s>"
"<s>[INST] find the error in this code: #define ONE 1
#define ZERO 0
#if ONE
int ok1;
#elif ZERO
int ok2;
#elif 0
int ok3;
#elif 1
int ok4;
#elif ONE
int ok5;
#endif
#if ZERO
int ok6;
#endif
#if 0
int ok7;
#endif
#if 1
int ok8;
#endif
#if ONE + ZERO
int ok9;
#endif
#if 7449 - 7000 - 448
int ok10;
#endif
#if 2
int duff1;
#endif
#if -1
int duff2;
#endif
void static_616(void)
{
} [/INST] The error is Preprocessor result not 0 or 1. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 func_not_ok(void)
{ return;
}
void static_617(void)
{ UINT_32 i = func_not_ok();
} [/INST] The error is Function call may return unexpected value. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <string.h>
struct struct_a
{ UINT_32 value;
};
void static_618(void)
{ struct struct_a s1 = {10}; struct struct_a s2 = {10}; BOOL test = memcmp(&s1, &s2, sizeof(struct struct_a));
} [/INST] The error is Use of memcmp between structures. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 fnA ( void )
{ return 1;
}
void static_619 ( void )
{ if (fnA == 0) { ; } if ( fnA ) { ; }
} [/INST] The error is Function address compared with zero or NULL. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct enddate { INT_32 year; INT_32 month; INT_32 day; };
void static_620(void)
{ INT_32 a3[4] = { [0] = -5, [1] = -4, [2] = -3, [2] = -2 }; struct enddate last = { .year = 2012, .month = 12, .year = 2000 };
} [/INST] The error is Initialisation designator duplicated. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_621 (UINT_32 n)
{ INT_32 vla [ n ];
} [/INST] The error is Variable-length array declared. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define M( this_is_a_parameter_of_macro_m_first, this_is_a_parameter_of_macro_m_second ) \ ((this_is_a_parameter_of_macro_m_first) +(this_is_a_parameter_of_macro_m_second))
#define M2(this_is_a_parameter_of_macro_m2_this_is_a_parameter_of_macro_m2_first, \ this_is_a_parameter_of_macro_m2_this_is_a_parameter_of_macro_m2_second) \ ((this_is_a_parameter_of_macro_m2_this_is_a_parameter_of_macro_m2_first) + \ (this_is_a_parameter_of_macro_m2_this_is_a_parameter_of_macro_m2_second))
static UINT_32 static_622( void )
{ return M ( 3U, 5U ) + M2 ( 3U, 5U );
} [/INST] The error is Macro parameters are not unique within limits. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
CHAR * return_string(void)
{ return ""fred"";
}
void static_623(void)
{ CHAR * string_test = ""test"";
} [/INST] The error is String assigned to non const object. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define int UINT_32
void static_626(void)
{
} [/INST] The error is #define of keyword. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_627(void)
{ INT_32 a1[2][2] = {{0}, [1][0] = 0, 1}; INT_32 a2[2][2] = {[0][1] = 0, {0, 1}};
} [/INST] The error is Initialiser both positional and designational. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
extern BOOL get_bool ( void );
void static_49(void)
{ BOOL flag = TRUE; INT_32 y = 0, x = 0, z = 1; if (x < 0 || z + y != 0) { flag = FALSE; } if ( flag && get_bool() ) { flag = FALSE; }
} [/INST] The error is Logical conjunctions need brackets. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define SIZE_USED 6
#define DATA 3
INT_32 static_628(void)
{
#define SIZE_NOT_USED 6
return SIZE_USED;
} [/INST] The error is Macro not used in translation unit. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_629( void )
{ SINT_32 local_denominator = 1; SINT_32 numerator = 9; SINT_32 result = numerator / ( local_denominator - 1 );
} [/INST] The error is Divide by zero found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_630(void)
{ enum traffic{ red=3, amber, green, yellow=4 }; enum traffic_ok{ Xred=3, Xamber=4, Xgreen, Xyellow=4 };
} [/INST] The error is Duplicated enumeration value. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_16 static_631( void )
{ goto L1; UINT_16 x = 10U; L1: x = x + 1U; return x; UINT_16 y = 0U;
} [/INST] The error is Declaration not reachable. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define SQ_2 (2*2)
INT_32 static_632(void)
{ return SQ_2;
} [/INST] The error is Use of // comment in pre-processor directive or macro defn. </s>"
"<s>[INST] find the error in this code: #include <wincrypt.h>
void static_633(HCRYPTPROV hProv, HCRYPTHASH hHash, HCRYPTKEY *hKey)
{ CryptDeriveKey(hProv, CALG_3DES, hHash, CRYPT_EXPORTABLE, hKey);
} [/INST] The error is Use of a broken or risky cryptography algorithm. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_634 (UINT_32 name_x)
{ UINT_32 count = 0u; if (name_x == 0u) { count = 1u; } else { } for ( count; count < 10u; count++ ) { ; } { }
} [/INST] The error is Empty block found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_635 (FLOAT_32 *f_ptr)
{ FLOAT_32 ss = (FLOAT_32)f_ptr;
} [/INST] The error is Cast from pointer to float type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_636 ( void )
{ void *p = (void*) 3.4f;
} [/INST] The error is Cast from float type to pointer. </s>"
"<s>[INST] find the error in this code: #define JOIN( x, y ) #x ## y
void static_637(void)
{ const char *name = JOIN (Control, 1 );
} [/INST] The error is # operand followed by ##. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_50(void)
{ SINT_32 b = 1; b >>= 1;
} [/INST] The error is Use of shift operator on signed type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
typedef struct { INT_32 a; INT_32 b; } struct_2int;
static void static_638 ( void )
{ INT_32 * ptr1 = malloc(5); INT_32 * ptr2 = malloc(32); struct_2int *ptr3 = malloc(5); struct_2int *ptr4 = malloc(32); struct_2int *ptr5 = malloc(4*sizeof(struct_2int));
} [/INST] The error is Memory allocation non-conformant with type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_639( void )
{ UINT_32 name_x = 1u; if(name_x == 0u) { } { }
} [/INST] The error is Potentially missing else statement. </s>"
"<s>[INST] find the error in this code: #include <stdio.h>
struct a_str
{ char text[6];
};
static struct a_str get_text(void)
{ struct a_str result = {""world""}; return result;
}
void static_642(void)
{ struct a_str my_str = get_text(); printf(""Hello, %s!\n"", my_str.text); printf(""Hello, %s!\n"", get_text().text);
} [/INST] The error is Function return type with array field. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <errno.h>
static SINT_32 fn1 (void)
{ return (errno);
}
static SINT_32 static_643 (void)
{ return (EIO);
} [/INST] The error is Function return type is not errno_t. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
typedef struct astr
{ char ch; int ii;
} astr;
void static_644 (void)
{ astr str; astr *ptr1 = (astr*)malloc(10 * sizeof(astr)); astr *ptr2 = NULL; astr *ptr3 = &str; ptr1 = (astr*)realloc(ptr1, 20 * sizeof(astr)); ptr2 = (astr*)realloc(ptr2, 6 * sizeof(astr)); ptr3 = (astr*)realloc(ptr3, 8 * sizeof(astr));
} [/INST] The error is realloc ptr does not originate from allocation function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
typedef struct atag
{ char ach; FLOAT_32 afl;
} str1_t;
typedef struct btag
{ SINT_64 ll; SINT_16 *pp; char cc;
} str2_t;
str1_t * astr;
static void static_645( void )
{ str1_t *past = (str1_t*) malloc(sizeof(str1_t)); str2_t *qast = (str2_t*) realloc(past, sizeof(str2_t));
} [/INST] The error is realloc ptr type does not match target type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct tag { SINT_16 ss; FLOAT_32 ff; };
static void static_646( void )
{ struct tag astruct = { 3, 7.1F, 7 };
} [/INST] The error is Struct initialisation has too many items. </s>"
"<s>[INST] find the error in this code: #include <string.h>
int array[30];
static void static_647( void )
{ memcpy( array, array, 20);
} [/INST] The error is Overlapping data items in memcpy. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_648 ( void )
{ struct { INT_32 i1; INT_32 arr1[0]; } astruct1; struct { INT_32 i2; INT_32 arr2[1]; } astruct2; struct { INT_32 i3; INT_32 arr3[]; } astruct3;
} [/INST] The error is Deprecated form of flexible array. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct flex { INT_16 size; INT_16 arr[]; };
static void static_649( void )
{ struct flex flexarr; flexarr.size = 10; flexarr.arr[9] = 99;
} [/INST] The error is Use of unallocated flexible array. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_51(void)
{ UINT_32 x = 0u; UINT_32 y = 2u; x = y << 34u; x = 4u << 10u;
} [/INST] The error is Shifting value too far. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
struct flex { INT_16 num; INT_16 data[];
};
static void static_650( void )
{ struct flex *parr1; struct flex *parr2; parr1 = (struct flex*) malloc(sizeof(struct flex)+ (sizeof(int)*40)); (*parr1).num = 40; parr2 = (struct flex*) malloc(sizeof(struct flex)+ (sizeof(int)*40)); (*parr2).num = 40; *parr1 = *parr2;
} [/INST] The error is Flexible array copy ignores last member. </s>"
"<s>[INST] find the error in this code: #include <string.h>
#include <stdlib.h>
static char static_652( void )
{ char res; char *cptr = (char*)malloc(sizeof(char)*7); char *dptr = (char*)malloc(sizeof(char)*7); char src[7] = ""abcdef""; strcpy(cptr, src); res = cptr[3]; res = dptr[3]; return res;
} [/INST] The error is Object created by malloc used before initialisation. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define GEN(x) _Generic( x, int : 1, default : 72 )
static void static_653( void )
{ SINT_32 y = 66; SINT_32 avar = GEN(y++); SINT_32 bvar = GEN(y);
} [/INST] The error is Apparent side effects in _Generic or _Alignof. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
union u1
{ INT_32 i1 ; INT_32 arr1[];
};
union u2
{ INT_32 i2; INT_32 arr2[0];
}; [/INST] The error is Union contains flexible array. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <string.h>
struct struct_a
{ UINT_32 value;
};
static void static_655( void )
{ struct struct_a s1 = {10U}; UINT_32 b32 = 1U; BOOL test = memcmp(&s1, &b32, sizeof(struct struct_a));
} [/INST] The error is Standard library copy/compare objects have different types. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define SIZE 3
SINT_32 global = SIZE > 0 ? 10 : 1;
SINT_32 static_656(void)
{ return global;
} [/INST] The error is Use of ternary expression within global initialisation. </s>"
"<s>[INST] find the error in this code: #include <string.h>
void static_661(void)
{ char buffer1[12] = ""abc""; char buffer2[12] = ""abc""; if ( memcmp ( buffer1, buffer2, 9 ) != 0 ) { }
} [/INST] The error is memcmp used to compare null terminated strings. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
void static_662(void)
{ char ch; ch = ( char ) getchar( ); if ( EOF != ( INT_32 ) ch ) { ; }
} [/INST] The error is EOF compared with char. </s>"
"<s>[INST] find the error in this code: #include <ctype.h>
void static_663(void)
{ if ( isalpha ( 256 ) != 0 ) { ; }
} [/INST] The error is Invalid value may be passed to function in <ctype.h>. </s>"
"<s>[INST] find the error in this code: typedef long double FLOAT_LD;
void static_672(void)
{ long double ld1 = 1.1L;
} [/INST] The error is long double is not permitted. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_52(void)
{ UINT_32 x = 1u; UINT_32 y = 2u; y = -x;
} [/INST] The error is Unsigned expression negated. </s>"
"<s>[INST] find the error in this code: void static_674(void)
{ wchar_t a_wide_char;
} [/INST] The error is wchar_t is not permitted. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
int typedef Length_32;
void static_678( void )
{ FLOAT_32 static fx;
} [/INST] The error is Type specifier before non-type specifier. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define VALUE 0
#if VALUE < 10
#error ""Incorrect value""
#endif
void static_681( void )
{ ;
} [/INST] The error is #error directive used. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_687 ( void )
{ UINT_32 arr[3] = { 1U, 2U, 3U }; INT_32 i; for ( i = 50; arr[i] != 0U; i-- ) { ; } for ( i = 50; (i >= 0) && (arr[i] != 0U) ; i-- ) { ; }
} [/INST] The error is Loop counter not checked for negative value. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
void static_688 ( void )
{ char * cptr = (char *)malloc(2000); INT_32 * iptr = (INT_32 *)malloc(5000000);
} [/INST] The error is Memory allocation exceeds 2 power *** bytes. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h"" void static_691( void ) { INT_32 *c = { 0 }; INT_32 *nc = { 1, 2, 3, 4, 5 }; } [/INST] The error is Initialisation of pointer with initialiser list. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_692(void)
{ SINT_32 array[5] = {0,0,0,0,0}; SINT_32 value = -1; array[value] = 1;
} [/INST] The error is Array index is negative. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_693(FLOAT_64 f64)
{ FLOAT_32 f32; f32 = (FLOAT_32)f64;
} [/INST] The error is Float expression cast to narrower float type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_694(SINT_64 s64)
{ SINT_32 s32; s32 = (SINT_32)s64;
} [/INST] The error is Integer expression cast to narrower integer type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_695(char ch)
{ SINT_32 s32; FLOAT_32 f32; s32 = (SINT_32)ch; f32 = (FLOAT_32)ch;
} [/INST] The error is Char expression cast to non-char type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 foo( UINT_32 v_1 )
{	return (v_1+1);
}
void static_53(void)
{ UINT_32 x = 1u; x++ , foo(x) ;
} [/INST] The error is Bool expression cast to non-bool type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_695(BOOL bl)
{ SINT_32 s32; s32 = (SINT_32)bl;
} [/INST] The error is Char expression cast to non-char type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_697(SINT_64 *ps64, void* pany)
{ SINT_32 *ps32; ps32 = ps64; ps32 = pany; ps32 = (void*)0;
} [/INST] The error is Pointer converted to different pointer type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
extern void use_with_care_proc ( void );
void static_698( void )
{ use_with_care_proc( );
} [/INST] The error is Potential improper use of function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define LOOP_N(n) for ( i = 0; i <(n); i++ );
void static_699( void )
{ SINT_32 count = 0; LOOP_N(10) { count ++; }
} [/INST] The error is Macro terminated with semi-colon. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct mydata { SINT_32 x; SINT_32 y; };
void static_700(SINT_64 value)
{ struct mydata info; info = (struct mydata)value;
} [/INST] The error is Cast involving structure type. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_701(SINT_32 *ptr)
{ void * pv; pv = (void *)ptr;
} [/INST] The error is Pointer cast to pointer to void. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_702(SINT_32 *ptr)
{ const SINT_32 * pc; pc = (const SINT_32 *)ptr;
} [/INST] The error is Cast adds qualification. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void LDRA_704(UINT_32 par_1, UINT_32 par_2)
{ UINT_32 x = 0; x = (par_1 || par_2); x = (par_1 && par_2); x = ( ( par_1 && par_2 ) ? 1 : 0); x = ( ( par_1 == par_2 ) ? 1 : 0); x = (par_1 != par_2); x = (par_1 == par_2); x = (par_1 > par_2); x = (par_1 < par_2); x = (par_1 <= par_2); x = (par_1 >= par_2); x = (par_1 >= 0);
} [/INST] The error is Assignment statement with boolean relational operator. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
BOOL isHexDigit( CHAR Hex )
{ BOOL bResult; bResult = FALSE; if ((Hex == '0') || (Hex == '1') || (Hex == '2') || (Hex == '3') || (Hex == '4') || (Hex == '5') || (Hex == '6') || (Hex == '7') || (Hex == '8') || (Hex == '9') || (Hex == 'A') || (Hex == 'a') || (Hex == 'B') || (Hex == 'b') || (Hex == 'C') || (Hex == 'c') || (Hex == 'D') || (Hex == 'd') || (Hex == 'E') || (Hex == 'e') || (Hex == 'F') || (Hex == 'f')) { bResult = TRUE; } return bResult;
} [/INST] The error is Procedure exceeds *** reformatted lines. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void complex_2_3 ( BOOL c_1, BOOL c_2 )
{ if (c_1) {
label1: ; } if (c_2) { goto label1; }
} [/INST] The error is Procedure contains essential knots. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(UINT_32 p_1, UINT_16 p_2)
{ }
void static_6(void)
{ void (*proc_pointer) (UINT_32 p_1, UINT_16 p_2) = foo; proc_pointer(1u, 1);
} [/INST] The error is Procedure pointer declared. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_54(void)
{ UINT_32 x = 1u; UINT_32 a = 1u; a = sizeof( x++ );
} [/INST] The error is Sizeof operator with side effects. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void complex_4 ( BOOL c_3, BOOL c_4 )
{
label1: if (c_3) { if (c_4) { goto label1; } }
} [/INST] The error is Procedure is not structured. </s>"
"<s>[INST] find the error in this code: void complex_5 ( void )
{
label1: goto label1;
} [/INST] The error is Procedure contains infinite loop. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 complex_7 (INT_32 status)
{ if ( status == 0 ) { return 1; } return 2;
} [/INST] The error is Procedure has more than one exit point. </s>"
"<s>[INST] find the error in this code: #define MAX_NUM 10
int arr[ MAX_NUM ];
void C_009( void )
{ int sub; for ( sub = 0; sub < MAX_NUM; sub++ ) { if ( arr[ sub ] == 0 ) { break; } if ( arr[ sub ] == 1 ) { break; } }
} [/INST] The error is Ess Cyclomatic Complexity greater than ***. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void complex_10 ( UINT_32 ee, UINT_32 ff, UINT_32 gg, UINT_32 hh)
{ UINT_32 aa, bb, cc, dd; for (aa = 1U; aa < ee; aa++) { for (bb = aa; bb < ff; bb++) { for (cc = bb; cc < gg; cc++) { for (dd = cc; dd < hh; dd++) { } } } }
} [/INST] The error is Loop depth greater than ***. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void complex_11 ( UINT_32 zz )
{ UINT_32 aa, bb, cc, dd, ee, ff, gg, hh, ii, jj, kk; for (aa = 1U; aa < zz; aa++) { } for (bb = 1U; bb < zz; bb++) { } for (cc = 1U; cc < zz; cc++) { } for (dd = 1U; dd < zz; dd++) { } for (ee = 1U; ee < zz; ee++) { } for (ff = 1U; ff < zz; ff++) { } for (gg = 1U; gg < zz; gg++) { } for (hh = 1U; hh < zz; hh++) { } for (ii = 1U; ii < zz; ii++) { } for (jj = 1U; jj < zz; jj++) { } for (kk = 1U; kk < zz; kk++) { }
} [/INST] The error is More than *** depth 1 loops. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 SDA_001( UINT_32 p_1, UINT_32 p_2 )
{ UINT_32 v_1; v_1 = p_1; v_1++; return v_1;
} [/INST] The error is Unused procedure parameter. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static INT_32 SDA_002( INT_32 par_1 )
{ if ( par_1 == 0 ) { return 0; } else if ( par_1 == 1 ) { return ; } else { ; }
} [/INST] The error is Function does not return a value on all paths. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 glob1 = 1;
static void fn( UINT_32 *par_1 )
{ *par_1 = *par_1 + glob1++;
}
static void SDA_003(void)
{ fn(&glob1);
} [/INST] The error is Actual parameter is also global to procedure. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static UINT_32 SDA_004( void )
{ UINT_32 v_1, v_2; v_1 = 0U; return v_1;
} [/INST] The error is Variables declared but not used in code analysed. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 exp_1(UINT_32 *p_1)
{ UINT_32 x = *p_1; (*p_1) = x*x; return (x);
}
UINT_32 exp_2(UINT_32 *p_1)
{ UINT_32 x = *p_1; (*p_1) = (x % 2u); return (x);
}
void static_55(void)
{ UINT_32 y = 3u, x = 0u; x = exp_1(&y) + exp_2(&y);
} [/INST] The error is Expression with more than one function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 SDA_005 ( void) ;
UINT_32 SDA_005 ( void)
{ UINT_32 v_1 , v_2 ; v_1 = v_2 ; v_2 = v_1 ; return v_2 ;
} [/INST] The error is UR data flow anomalies found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 SDA_006( UINT_32 par_a )
{ UINT_32 result; UINT_32 value; if (par_a != 1 ) { value = par_a; value--; result = SDA_006( value ) * par_a; } else { result=1u; } return (result);
}
UINT_32 Test_006(void)
{ UINT_32 result; result = SDA_006( 20 ); return result;
} [/INST] The error is Recursion in procedure calls found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void SDA_007( void )
{ BOOL flag = FALSE;
} [/INST] The error is DU data flow anomalies found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static BOOL SDA_008( void )
{ BOOL flag; flag = FALSE; flag = TRUE; return flag;
}
static BOOL SDA_008_1( void )
{ BOOL flag = FALSE; flag = TRUE; return flag;
} [/INST] The error is DD data flow anomalies found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
SINT_32 *glob_ptr;
void SDA_009(SINT_32 x_1, SINT_32* ptr_1, SINT_32* ptr_2, SINT_32 *ptr_3 )
{ *glob_ptr = *ptr_2; if (x_1 != 5) { *ptr_1 = x_1 + 6; *ptr_2 = x_1 + 6; ptr_3 = glob_ptr; }
} [/INST] The error is Defined parameter has possible clear path. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 globl = 1U;
void direct_access1( UINT_32 * par_1 )
{ *par_1 = *par_1 + globl;
}
void indirect_access(void)
{ UINT_32 local_var = 42U; direct_access1(&local_var);
}
static void SDA_010(void)
{ indirect_access();
} [/INST] The error is Globals used inside procedure. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void SDA_011( UINT_32 par_1, UINT_32 par_2 )
{ if (par_2 != 1U) { par_1 = 0U; } else { par_1= 1U; }
} [/INST] The error is Parameters do not match expected actions. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 SDA_012( UINT_32 par_1, UINT_32 par_2 )
{ UINT_32 var_1; var_1 = par_2; if (par_2 != 1) { var_1 = par_1; } return (var_1);
} [/INST] The error is Referenced parameter has possible clear path. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 globl = 1;
void fn_13( INT_32 * pVar )
{ *pVar = *pVar + globl;
}
void SDA_013( INT_32 * globl )
{ fn_13( globl );
} [/INST] The error is Global used in procedure matches local parameter. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void SDA_014( UINT_32 par_1, UINT_32 par_2 )
{ if (par_2 != 1U) { par_1 = 0U; } else { par_1= 1U; }
} [/INST] The error is Attempt to change parameter passed by value. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_56 ( void)
{ FLOAT_32 fl, f2; fl = 1.01f; f2 = 2.01f; if (fl == f2) { } if (fl >= 0.0f) { fl = fl + 0.01f; }
} [/INST] The error is Equality comparison of floating point. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void SDA_015(void (*p_proc_pointer)(void) )
{
} [/INST] The error is Unused procedural parameter. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void Test_016( UINT_32 *par_1, UINT_32 *par_2 )
{ if (par_1 == par_2) { }
}
static void SDA_016(void)
{ UINT_32 var = 6; Test_016( &var , &var );
} [/INST] The error is Identical actual parameters in call. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef struct
{ UINT_32 This_component_exceeds_thirty_one_characters_in_length; UINT_32 This_component_exceeds_thirty_one_characters_in_length_also;
} struct17;
static void SDA_017(void)
{ UINT_32 This_identifier_exceeds_thirty_one_characters_in_length; UINT_32 This_identifier_exceeds_thirty_one_characters_in_length_also; struct17 mystruct;
} [/INST] The error is Identifier not unique within *** characters. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 Re_Used;
UINT_32 SDA_018( void )
{ UINT_32 Re_Used; Re_Used = 1; return Re_Used;
} [/INST] The error is Identifier name reused. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_16 SDA_019(void)
{ UINT_16 retval; retval = Test_19d(); return (retval);
}
UINT_32 Test_19d( void )
{ return (1u);
} [/INST] The error is Procedure called before being defined. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static UINT_32 SDA_020(void)
{ UINT_32 retval; retval = undeclared; return (retval);
} [/INST] The error is No declaration for variable found before use. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 global = 0U;
UINT_32 SDA_022(void)
{ global++; return global;
} [/INST] The error is Function has global variable side effects. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 SDA_023( UINT_32 * par_1 )
{ *par_1 = 1; return (*par_1);
} [/INST] The error is Function has parameter side effects. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void SDA_024( UINT_32 * par_1 )
{ *par_1 = 1;
} [/INST] The error is Procedure definition has no associated prototype. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 g_var_1 = 1;
void SDA_025( UINT_32 * par_1 )
{ *par_1 = g_var_1;
} [/INST] The error is Scope of variable could be reduced. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_57(void)
{ UINT_32 x = 0U; x; (void)x;
} [/INST] The error is Statement with no side effect. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 SDA_026;
SINT_32 SDA_026;
void SDA_026(void)
{
} [/INST] The error is Variable should be defined once in only one file. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 global_1 = 1;
INT_32 global_2 = 2;
static INT_32 SDA_027( void )
{ return global_2 - global_1;
}
INT_32 main( void )
{ return SDA_027() + SDA_027_2();
} [/INST] The error is Variable should be declared static. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 global_2;
INT_32 SDA_027_2 ( void )
{	return global_2;
} [/INST] The error is Variable should be declared static. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void SDA_028( void )
{ INT_32 i = 1; BOOL flag = TRUE; while (flag) { if (i==0) { flag = FALSE; } }
} [/INST] The error is Potentially infinite loop found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct s29
{ UINT_32 u1; UINT_32 u2; UINT_32 u3;
};
static UINT_32 SDA_029( struct s29 s )
{ UINT_32 result; result = s.u1 + s.u2; return (result);
}
static UINT_32 Test_029( void )
{ UINT_32 a; struct s29 s; s.u1=1U; s.u2=2U; s.u3=3U; a = SDA_029( s ); return (a);
} [/INST] The error is Partially used structure parameter. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
extern UINT_32 global;
UINT_32 sda_033_2(void)
{ global++; return global;
} [/INST] The error is No real declaration for external variable. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 SDA_034( UINT_32 a1 )
{ UINT_32 b = a1; b--; return b;
}
static UINT_32 test_034(void)
{ UINT_32 a = 1U; a = SDA_034( a ); return a;
} [/INST] The error is Procedure name re-used in different files. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
SINT_32 SDA_034( SINT_32 a1 )
{ SINT_32 b = a1; b--; return b;
} [/INST] The error is Procedure name re-used in different files. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 SDA_035( UINT_32 par_1 )
{ UINT_32 result; UINT_32 var_1 = par_1; result = var_1++ + var_1; return (result);
} [/INST] The error is Expression has side effects. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_58(void)
{ UINT_32 Timing_Loop = 100U; while ( Timing_Loop > 0U ); Timing_Loop--; ;
} [/INST] The error is Null statement found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 No_Name( UINT_32 );
UINT_32 SDA_036( UINT_32 var_1 );
UINT_32 No_Name( UINT_32 name )
{ return name;
}
UINT_32 SDA_036( UINT_32 par_1 )
{ UINT_32 result; result = par_1; return result;
} [/INST] The error is Prototype and definition name mismatch. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 SDA_037(void)
{ static UINT_32 var_1; var_1++; return (var_1);
} [/INST] The error is Function has persistent local side effects. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void SDA_038( UCHAR *pArray, UINT_32 ArraySize)
{ UCHAR element; UINT_32 stepup=0U, stepdn; stepdn = ArraySize; stepdn--; while( stepdn > stepup ) { element = pArray[ stepdn ]; pArray[ stepdn ] = pArray[ stepup ]; pArray[ stepup ] = element; stepup++; stepdn--; }
} [/INST] The error is More than one control variable for loop. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void SDA_039( void )
{ UINT_32 it; for (it = 0; it < 42U; it++) {
lb1: it++;
lb2: it++; if (it == 7U) { goto lb1; } else { if (it == 9U) { goto lb2; }	else { } } }
} [/INST] The error is More than one entry to a loop. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void SDA_040( void )
{ UINT_32 it; for (it = 0U; it < 42U; it++) { if (it == 9U) { break; } else { } }
} [/INST] The error is More than one exit from a loop. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void SDA_041( UINT_32 param );
void SDA_041( UINT_32 param )
{ UINT_32 result = foo( param );
} [/INST] The error is Procedure call has no prototype declared. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static INT_32 * fn_D42( void )
{ INT_32 local_var = 22; return &local_var;
}
void SDA_042( void )
{ INT_32 * result = fn_D42();
} [/INST] The error is Local pointer returned in function result. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void SDA_043( void )
{ SINT_32 local_denominator = 0; SINT_32 numerator = 9; SINT_32 result = numerator / local_denominator;
} [/INST] The error is Divide by zero found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
void SDA_045( UINT_32 * par_1 )
{ UINT_32 * lvar_1 = (UINT_32 *)malloc(sizeof(*lvar_1)); *lvar_1 = *par_1;
} [/INST] The error is Pointer not checked for null before use. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
void SDA_047( UINT_32 * par_1 )
{ UINT_32 * lvar_1 = (UINT_32*)malloc(sizeof(lvar_1)); *lvar_1 = *par_1;
} [/INST] The error is Unused inspect annotation. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_59 (void)
{ UINT_32 x = 2u; if ( x == 2u ) { ; } else if ( x == 3u) { ; } if ( x == 2u ) { ; }
} [/INST] The error is Else alternative missing in if. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
#include <stdlib.h>
void SDA_048( void );
void SDA_048( void )
{ FILE *inp, *outp; SINT_32 ch; inp = fopen(""infile.txt"", ""r""); do { ch = getc(inp); if (ch == (SINT_32)EOF) { } else { putc( ch, outp ); ch = getc(inp); } } while (ch != (SINT_32)EOF ); fclose(inp); fclose(outp);
} [/INST] The error is Attempt to write to unopened file. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
#include <stdlib.h>
void SDA_049( void )
{ FILE *inp, *outp; SINT_32 ch; inp = fopen(""infile.txt"", ""r""); outp = fopen(""outfile.txt"", ""w""); do { ch = getc(inp); if (ch == (SINT_32)EOF) { } else { putc( ch, outp ); ch = getc(inp); } } while (ch != (SINT_32)EOF ); fclose(inp);
} [/INST] The error is File pointer not closed on exit. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
void SDA_050( UINT_32 * par_1 )
{ UINT_32 * lvar_1 = (UINT_32 *)malloc(sizeof(lvar_1)); if (lvar_1 != (UINT_32 *)0) { *lvar_1 = *par_1; } lvar_1 = par_1;
} [/INST] The error is Memory not freed after last reference. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
static void SDA_051( UINT_32 * par_1 )
{ UINT_32 * lvar_1 = (UINT_32 *)malloc(sizeof(lvar_1)); UINT_32 * lvar_2; if (lvar_1 != (UINT_32 *)0) { *lvar_1 = *par_1; free(lvar_1); *lvar_2 = *lvar_1; }
} [/INST] The error is Attempt to read from freed memory. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void SDA_053( void)
{ CHAR *ptr1, *ptr2; ptr1 = ptr2;
} [/INST] The error is Attempt to use uninitialised pointer. </s>"
"<s>[INST] find the error in this code: typedef struct struct_fn_t
{ void (* s_fn)(struct struct_fn_t * s_fn_ptr);
} struct_fn;
void sda_054 ( void )
{ struct_fn s_fn_ptrs[10]; struct_fn * sda_054_p = &s_fn_ptrs[0]; sda_054_p->s_fn (sda_054_p++);
} [/INST] The error is Unsafe use of function pointer variable. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void SDA_055( UINT_32 max_count )
{ UINT_32 loop_counter = 0U; for (loop_counter = 0U; loop_counter < max_count; loop_counter++) { if (loop_counter == 7U) { loop_counter++; } else { } }
} [/INST] The error is Modification of loop counter in loop body. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
const SINT_32 g_var;
void SDA_057( SINT_32 p_var )
{ SINT_32 result1 = g_var * p_var;
} [/INST] The error is Global not initialised at declaration. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void SDA_058( void )
{ CHAR str1[] = {'a', 'b', 'c'}; CHAR str2[] = {'d', 'a', 'f'}; CHAR str3[] = {'x', 'y', 'b'}; CHAR * some_string = ""Hello World""; CHAR * another_string = ""Hello World"";
} [/INST] The error is Character or string literal re-used. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UCHAR glob;
static void sda_059( UCHAR par1, UCHAR par2, UCHAR arr3[5], const UCHAR arr4[5] )
{ par2 = glob; glob = par1; glob = arr3[0] + arr4[0];
} [/INST] The error is Parameter should be declared const. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_060(SINT_32 p_1)
{ switch (p_1) { }
} [/INST] The error is Empty switch statement. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
extern SINT_32 some_int;
extern SINT_32 some_int;
SINT_32 some_int = 0;
void sda_060( void )
{ ; } [/INST] The error is External object should be declared only once. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void helper_proc1( void ) { ; }
void helper_proc2( void) { ; }
void sda_061( void )
{ helper_proc1(); helper_proc2();
} [/INST] The error is Procedure should be declared static. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
int main(void)
{ sda_061(); return 0;
} [/INST] The error is Procedure should be declared static. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void sda_063_1( void );
void sda_063_2( void );
void sda_063_1( void )
{
}
int main(void)
{ sda_063_1(); sda_063_2(); return 0;
} [/INST] The error is No definition in system for prototyped procedure. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static UINT_32 sda_064_1( void )
{ UINT_32 local_int; local_int = 0U; local_int++; return local_int;
} [/INST] The error is Local not initialised at declaration. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void sda_065_1( void )
{ UINT_32 local_int = 1U; local_int++;
} [/INST] The error is Void function has no side effects. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
extern UINT_16 sda_066_2( void );
static void sda_066( void )
{ SINT_32 loop; UINT_16 u8a = 0U; BOOL flag = FALSE; for( loop = 0; (loop < 10 ) && ( u8a != 42U ); ++loop ) { u8a = sda_066_2(); } for( loop = 0; (loop < 10 ) && flag; ++loop ) { u8a = sda_066_2(); flag = u8a != 42U; }
} [/INST] The error is Non boolean control variable modified in loop. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 global = 0U;
void sda_067_1( UINT_32 p1, UINT_32 p2 )
{ global = (global + p1) * p2;
}
void SDA_067( UINT_32 p3 )
{ sda_067_1( p3++, p3++ );
} [/INST] The error is Void function has global variable side effects. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void SDA_068_1( UINT_32 p1, UINT_32 p2 )
{ static UINT_32 var_1; var_1 = (var_1 + p1) * p2;
}
void SDA_068_2( UINT_32 p3 )
{ SDA_068_1( p3++, p3++ );
} [/INST] The error is Void function has persistent local side effects. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void sda_069 ( void )
{ UINT_32 var_1; var_1++;
} [/INST] The error is UR anomaly, variable used before assignment. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_061(SINT_32 p_1)
{ SINT_32 i = p_1; switch (p_1) { default: i++; } switch (p_1) { case 1: default: i++; }
} [/INST] The error is Switch contains default only. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
static void sda_070 ( const UINT_32 p1 )
{ UINT_32 var_1 = 0U; UINT_32 var_2 = p1; var_1++; if ( p1 > 42U ) { printf(""%u\n"", var_2); }
} [/INST] The error is DU anomaly, variable value is not used. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 arr[] = {1U, 2U, 3U};
static UINT_32 sda_072_2( UINT_32 * p2 )
{ (*p2)++; return 1U;
}
static void sda_072_1( UINT_32 idx )
{ UINT_32 p1; p1 = arr[idx] + sda_072_2( &idx );
} [/INST] The error is Potential side effect problem in expression. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void SDA_073( void);
SINT_32 ss = 0;
SINT_32 st = 0;
static void SDA_073( void)
{ while( st > ss && (ss = 1) < 10 ){}
} [/INST] The error is Predicate variable modified in condition. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
static void SDA_075( void)
{ UINT_32 xx; FILE * fptr = fopen(""mikes.h"",""rw""); fscanf(fptr,""%d"",&xx ); if( xx == 0 ) { fptr = fopen(""mikes.h"",""rw""); } else { }
} [/INST] The error is Attempt to open file pointer more than once. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void SDA_076 ( void)
{ ;
}
SINT_32 main(void)
{
} [/INST] The error is Procedure is not called or referenced in code analysed. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct tag
{ UCHAR * uptr;
};
static struct tag SDA_077 (void)
{ UCHAR loc = 42; struct tag rtag; rtag.uptr = &loc; return rtag;
} [/INST] The error is Local structure returned in function result. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void SDA_078( void);
UCHAR glob=9;
static void SDA_078( void )
{ UCHAR loc; loc = glob;
}
int main(void)
{ SDA_078( );
} [/INST] The error is Global variable should be declared const. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static SINT_32 func(SINT_32 pp)
{ return pp;
}
static void SDA_080( void)
{ SINT_32 x; x = func(1);
} [/INST] The error is Potentially unused function-modified value. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
FILE * fptr;
static void SDA_081( void)
{ fptr = fopen(""mikes.h"",""r""); remove(""mikes.h""); fclose(fptr);
} [/INST] The error is Attempt to remove an open file. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
static void SDA_082( void)
{ FILE * fptr; struct {SINT_32 ff;}astr; fpos_t * anoffset = (fpos_t *)&astr; fptr = fopen(""afile.h"",""w""); fsetpos(fptr,anoffset);
} [/INST] The error is fsetpos values not generated by fgetpos. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_62(SINT_32 p_1)
{ SINT_32 i = 0, j = 0; switch (p_1) { case 0: j = 0; case 1: j = i; break; default: i = j + 1; }
} [/INST] The error is Switch case not terminated with break. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
static void SDA_083( SINT_32 par );
SINT_32 ch;
FILE * fptr;
static void SDA_083( SINT_32 par )
{ if( par == 341 ) { ungetc(ch,fptr); } if( par > 0 ) { ungetc(ch,fptr); }
} [/INST] The error is Potentially repeated call to ungetc. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
#include <string.h>
static void SDA_084( void);
static void SDA_084( void)
{ int c,i; char data[256],append_data[256]; FILE *fp1; strcpy(append_data,""Some data to append""); fp1 = fopen(""pf1.txt"",""a+""); c = getc(fp1); fwrite(append_data,256,1,fp1); if (c != 'o') { fread(data,256,1,fp1); } fclose (fp1);
} [/INST] The error is No fseek or flush before I/O. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
#include <string.h>
static void SDA_085( void)
{ char ok_file_name[256],bad_file_name1[256],bad_file_name2[256]; FILE *fp1,*fp2,*fp3; strcpy(ok_file_name,""/home/ldra.txt""); fp1 = fopen(ok_file_name,""w""); scanf(""%s %s"",bad_file_name1,bad_file_name2); if (strcmp(bad_file_name2,""bad_file.txt"") != 0) { fp2 = fopen(bad_file_name1,""w""); fp3 = fopen(bad_file_name2,""w""); } fclose (fp1); fclose (fp2); fclose (fp3);
} [/INST] The error is Filename not verified before fopen. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
#include <string.h>
static void SDA_086( void)
{ char input_string1[256], input_string2[256]; scanf(""%s %s"",input_string1, input_string2); if (input_string2 != NULL) { fprintf(stderr, input_string1); }
} [/INST] The error is User input not checked before use. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
INT_32 glob_var;
volatile sig_atomic_t e_flag = 0;
void my_handler1(int signum)
{ glob_var = 99; fprintf(stderr,""Signal %d encountered\n"",signum);
}
void my_handler2(int signum)
{ e_flag = 99; fprintf(stderr,""Signal %d encountered\n"",signum);
}
void SDA_087(void)
{ signal(SIGINT, my_handler1); signal(SIGTERM,my_handler2);
} [/INST] The error is Illegal shared object in signal handler. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <signal.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <setjmp.h>
static jmp_buf env;
static void my_handler1(int signum)
{ fprintf(stderr,""Signal %d encountered\n"",signum); longjmp(env,1);
}
static void SDA_088(void)
{ setjmp(env); signal(SIGINT,my_handler1);
} [/INST] The error is Illegal use of longjmp in signal handler. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <signal.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <setjmp.h>
static jmp_buf env;
void my_handler1(INT_32 signum)
{ fprintf(stderr,""Signal %d encountered\n"",signum);
}
void my_handler2(INT_32 signum)
{ fprintf(stderr,""Signal %d encountered\n"",signum); raise(SIGUSR1);
}
void SDA_089(void)
{ signal(SIGUSR1, my_handler1); signal(SIGINT, my_handler2);
} [/INST] The error is Signal called from within signal handler. </s>"
"<s>[INST] find the error in this code: #include <pthread.h>
#define NumOfThreads 2
int ind[] = {0, 1};
pthread_mutex_t mutexA;
static pthread_t TheThread[NumOfThreads];
void *funcA( void * arg );
void *funcB( void * arg );
int count = 0;
int main()
{ int i, status; pthread_create( &TheThread[0], NULL, funcA , &ind[0]); pthread_create( &TheThread[1], NULL, funcB , &ind[1]); for(i = 0; i < NumOfThreads; i++) { pthread_join(TheThread[i], (void **)&status ); }
}
void *funcA( void * arg )
{ pthread_mutex_lock(&mutexA); count++; pthread_mutex_unlock(&mutexA); return 0;
}
void *funcB( void * arg )
{ pthread_mutex_unlock(&mutexA); count++; pthread_mutex_lock(&mutexA); return 0;
} [/INST] The error is Unguarded global used in threaded function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 glob_res = 0U;
static UINT_32 return_unsigned ( void )
{ return 4U;
}
static void SDA_091 ( UINT_32 x )
{ UINT_32 partused; partused = return_unsigned ( ); if ( x == 3 ) { glob_res = partused; }
} [/INST] The error is Function return value potentially unused. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void SDA_093 ( void )
{ UINT_32 local = 44U; use_uint(local);
} [/INST] The error is Local variable should be declared const. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_63()
{
} [/INST] The error is Empty parameter list to procedure/function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 SDA_094( void )
{ UINT_32 v_1; UINT_32 v_2; v_1 = 0; return v_1;
} [/INST] The error is Named variable declared but not used in code. </s>"
"<s>[INST] find the error in this code: extern void gf1(void);
void (*gfptr)(void) = &gf1;
void SDA_095(void)
{ gfptr();
} [/INST] The error is Named global function pointer used in procedure. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void SDA_096( void )
{ UINT_32 v_1 = 0U; v_1 = 3U;
} [/INST] The error is Variable has repeated initialisation. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <signal.h>
#include <stdio.h>
static void my_handler2(INT_32 signum)
{ fprintf(stderr,""Signal %d encountered\n"", signum);
}
static void my_handler1(INT_32 signum)
{ fprintf(stderr,""Signal %d encountered\n"", signum); signal(SIGHUP, my_handler2);
}
static void SDA_097(void)
{ signal(SIGINT, my_handler1);
} [/INST] The error is Signal called from within signal handler. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
void SDA_098(void)
{ FILE *fp1; fp1 = fopen(""file1.dat"", ""r""); fprintf(fp1, ""Attempting to write to read-only file\n""); fclose(fp1);
} [/INST] The error is Attempt to write to file opened read only. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void SDA_099(INT32 *p, INT32 **pp1, INT32 **pp2)
{ INT_32 x; INT_32 *xp; x = *p; x = **pp1; xp = *pp2;
} [/INST] The error is Named pointer object used in procedure. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
#include <stdlib.h>
void SDA_103(void)
{ CHAR ch; FILE *fp1,*fp2; fp1 = fopen(""file1.txt"", ""r""); ch = getc(fp1); if (ch != (INT_32)EOF) { fp2 = fopen(""file1.txt"",""w""); } fclose (fp1); fclose (fp2);
} [/INST] The error is File opened both read and write. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct not_opaque
{ INT_32 a; CHAR c;
};
typedef struct not_opaque *ptr_not_opaque;
typedef struct opaque *ptr_opaque;
void SDA_104(void)
{ struct opaque opq; struct not_opaque nopq; ptr_opaque p_ok1 = &opq; ptr_opaque p_ok2; ptr_not_opaque p_nok1; p_ok2 = p_ok1; p_nok1 = &nopq;
} [/INST] The error is Structure implementation not hidden. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
static void sda_105 ( const UINT_32 p1 )
{ UINT_32 var_1 = 0U; UINT_32 var_2 = p1; var_1++; if ( p1 > 42U ) { printf(""%u\n"", var_2); }
} [/INST] The error is DU anomaly dead code, var value is unused on all paths. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void SDA_106( INT_32 * par_1 )
{ *par_1 = 1;
} [/INST] The error is No prototype for non-static function. </s>"
"<s>[INST] find the error in this code: #include <setjmp.h>
#include ""c_standards.h""
static void static_7(jmp_buf mark, SINT_32 val)
{ longjmp(mark,val);
} [/INST] The error is Jump out of procedure. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(void)
{
}
void static_64(void)
{ CHAR x; x = (CHAR) foo();
} [/INST] The error is Void procedure used in expression. </s>"
"<s>[INST] find the error in this code: #include <stdlib.h>
#include <string.h>
void SDA_107( void )
{ char *error_str; char *buf = ""extra_text""; error_str = getenv (""MY_VAR""); strcat(error_str, buf);
} [/INST] The error is Attempt to change system call capture string. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
extern void (*pfn)( );
#define GET_TAINTED_INT(val) \ do {const char *taint = getenv(""TAINT_I""); \ if (taint == NULL) {taint = ""42"";} \ val = strtol(taint, 0, 10); \ } while (0);
void SDA_108(void)
{ INT_32 tainted; GET_TAINTED_INT(tainted) (*pfn)(tainted);
} [/INST] The error is Tainted argument to unprototyped func ptr. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
#include <stdlib.h>
#define GET_TAINTED_INT(val) \ do {const char *taint = getenv(""TAINT_I""); \ if (taint == NULL) {taint = ""42"";} \ val = strtol(taint, 0, 10); \ } while (0);
void SDA_109(void)
{ INT_32 tainted; char buff[4]; GET_TAINTED_INT(tainted) (void) sprintf(buff, ""%d"", tainted);
} [/INST] The error is Tainted argument to formatted i/o function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 fn(INT_32 a);
INT_32 fn(INT_32 a);
INT_32 fn(INT_32 a)
{ return a;
}
void sda_110( void )
{ INT_32 rc; rc = fn(0);
} [/INST] The error is More than one prototype for same function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
#include <limits.h>
#include <errno.h>
void sda_111(const char *c_str)
{ char *endpt1 = NULL; UINT_64 num1 = strtoul(c_str, &endpt1 ,0); if ( endpt1 == c_str || (num1 == ULONG_MAX && errno == ERANGE) ) { ; } else { ; }
}
int main( int argc, char *argv[] )
{ sda_111(""Hello"");
} [/INST] The error is errno checked without having been set for errno setting fn. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
#include <stdio.h>
void sda_112(void)
{ INT_32 *x = (INT_32*)malloc(10 * sizeof(INT_32)); if (x == NULL) { fprintf(stderr, ""malloc failure in %s\n"", __func__); free(x); } else { x[0] = 1; } free(x);
}
int main( int argc, char *argv[] )
{ sda_112();
} [/INST] The error is Free called twice on same variable. </s>"
"<s>[INST] find the error in this code: #include <stdio.h>
void SDA_113(int p1)
{ FILE *fp1; fp1 = fopen(""data1.txt"",""r""); if (p1 == 0) { fclose(fp1); } fclose(fp1);
} [/INST] The error is File closed more than once. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
#include <string.h>
void SDA_115(INT_32 *xfrom, UINT_32 sz)
{ UINT_32 xsize; const UINT_32 csize = 5U; INT_32 *yto = (INT_32 *)malloc(10 * sizeof(INT_32)); if (yto != NULL) { xsize = sz; memcpy(yto, xfrom, xsize * sizeof(INT_32)); memcpy(yto, xfrom, csize); }
} [/INST] The error is Copy length parameter not checked before use. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void SDA_118(INT_32 * p1)
{ *p1 = 77;
} [/INST] The error is Object changed via dereferenced pointer. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 glob = 0U;
void sda_119( UINT_32 * const ptr1, UINT_32 *ptr2, UINT_32 *ptr3 )
{ *ptr1 = 0; *ptr2 = 0; ptr3 = &glob;
} [/INST] The error is Pointer param should be declared const pointer. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void void_para_func(void P1)
{
}
void static_65( void )
{ void v_ptr; UINT_32 a; void_para_func(v_ptr); void_para_func((void)a);
} [/INST] The error is Void variable passed as parameter. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void sda_120( UINT_32 * pptr1, const UINT_32 * pptr2, UINT_32 * pptr3, UINT_32 arr1[ ], const UINT_32 arr2[ ] )
{ *pptr1 = *pptr2 + *pptr3; *pptr1 = arr1[0] + arr2[0];
} [/INST] The error is Pointer param should be declared pointer to const. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
#include <limits.h>
#include <errno.h>
void sda_121(const char *c_str)
{ char *endpt1 = NULL; unsigned long num1 = strtoul(c_str, &endpt1, 0);
}
int main( int argc, char *argv[] )
{ sda_121(""Hello"");
} [/INST] The error is errno neither set nor checked for errno setting function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
#include <limits.h>
#include <errno.h>
void sda_122(const char *c_str)
{ char *endpt1 = NULL; errno = 0; unsigned long num1 = strtoul(c_str, &endpt1, 0);
}
int main( int argc, char *argv[] )
{ sda_122(""Hello"");
} [/INST] The error is errno not checked after being set for errno setting fn. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
void SDA_123( void )
{ FILE *f = fopen(""file"", ""w""); fprintf(f, ""hello world\n""); fclose(f);
} [/INST] The error is File pointer not checked for null before use. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
void sda_124( FILE *stream )
{ INT_32 in; INT_32 out; in = getc(stream); if ( in != EOF ) { (void)printf(""Input char %c\n"", (char)in); out = putc(in, stream); (void)printf(""Output char %c\n"", (char)out); }
} [/INST] The error is Var set by std lib func return not checked before use. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
void SDA_125(void)
{ INT_32 *ptr = 0; free(ptr);
} [/INST] The error is free called on variable with no allocated space. </s>"
"<s>[INST] find the error in this code: #include <stdio.h>
void SDA_126( void )
{ FILE *fp1; fclose(fp1);
} [/INST] The error is File closed that was never opened. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void SDA_127( SINT_32 num, SINT_32 val )
{ SINT_32 result; SINT_32 denom = val; result = num / denom; if ( denom != 0 ) { result = num / denom; }
} [/INST] The error is Local or member denominator not checked before use. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 *glob1;
UINT_32 *glob2;
void SDA_128(void)
{ UINT_32 loc = *glob1; UINT_32 loc2; if (glob2 != NULL) { loc2 = *glob2; }
} [/INST] The error is Global pointer not checked within this procedure. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
FILE *f1;
FILE *f2;
void SDA_129(void)
{ fprintf(f1, ""hello world\n""); if (f2 != NULL) { fprintf(f2, ""hello world\n""); }
} [/INST] The error is Global file pointer not checked within this procedure. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 static_66 ( void )
{ return;
} [/INST] The error is Function with empty return expression. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdio.h>
#include <stdlib.h>
SINT_32 glob1;
SINT_32 glob2;
void SDA_130(void)
{ glob1 = atoi(""string 1""); printf(""glob1 = %d"", glob1); glob2 = atoi(""string 2""); if (glob2 > 0) { printf(""glob2 = %d"", glob2); }
} [/INST] The error is Global set by std lib func return not checked before use. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
SINT_32 glob1 = 1;
SINT_32 glob2 = 1;
void SDA_131(void)
{ SINT_32 loc1; SINT_32 loc2; loc1 = 2 / glob1; if (glob2 > 0) { loc2 = 2 / glob2; }
} [/INST] The error is Global denominator not checked within this procedure. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <errno.h>
#include <stdlib.h>
void SDA_132 ( void )
{ FLOAT_64 f64; errno = 0; f64 = atof ( ""A.12"" ); if ( errno == 0 ) { ; }
} [/INST] The error is errno checked after call to non-errno setting function. </s>"
"<s>[INST] find the error in this code: #include <stdio.h>
#include <locale.h>
#include <time.h>
void SDA_133( void )
{ char *ret_1; char *ret_2; ret_1 = setlocale ( LC_ALL, 0 ); ret_2 = setlocale ( LC_MONETARY, ""French"" ); ( void ) printf ( ""%s\n"", ret_1 );
}
static void SDA_133_B ( time_t *t )
{ char * time1 = asctime(localtime(t)); char * time2 = ctime(t); printf(""%s"", time1);
}
static void SDA_133_C( time_t *t )
{ struct tm * tmptr1 = gmtime(t); struct tm * tmptr2 = localtime(t); printf(""%2d:%02d\n"", (tmptr1->tm_hour)%24,tmptr1->tm_min);
}
static void SDA_133_D( time_t *t )
{ const char *res2; struct lconv *lc = localeconv(); res2 = setlocale ( lc, ""French"" ); printf ( ""%s\n"", lc->currency_symbol );
} [/INST] The error is Pointer from system function used after subsequent call. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <errno.h>
#include <stdlib.h>
extern void someFunction ( FLOAT_64 v );
void SDA_134 ( void )
{ char *endptr; FLOAT_64 value; errno = 0; value = strtod(str, &endptr); someFunction(value); if ( 0 != errno ) { }
} [/INST] The error is errno not checked before subsequent function call. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
SINT_32 glob = 1;
void sda135(SINT_32 flag)
{ SINT_32 *ptr1 = NULL; SINT_32 *ptr2 = NULL; SINT_32 val; if (flag == 1) { ptr1 = &glob; ptr2 = &glob; } val = *ptr1; if (ptr2 != NULL) { val = *ptr2; }
} [/INST] The error is Global pointer assigned to NULL may be dereferenced. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
SINT_32 glob = 1; SINT_32 *glob_ptr1 = NULL; SINT_32 *glob_ptr2 = NULL;
void sda135(SINT_32 flag)
{ SINT_32 val; if (flag == 1) { glob_ptr1 = &glob; glob_ptr2 = &glob; } val = *glob_ptr1; if (glob_ptr2 != NULL) { val = *glob_ptr2; }
} [/INST] The error is Global pointer assigned to NULL may be dereferenced. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void SDA_137(SINT_32 num, SINT_32 denom)
{ SINT_32 loc1; result = num / denom; if (denom != 0) { result = num / denom; } assert( denom != 0 ); result = num / denom;
} [/INST] The error is Parameter used as denominator not checked before use. </s>"
"<s>[INST] find the error in this code: #include <stdio.h>
#include <string.h>
void SDA_138(void)
{ char str[] = ""This is a test""; memset(str, '-', 5); printf(""%s"", str);
} [/INST] The error is Third argument to memory function is an odd constant. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void SDA_139(SINT_32 *array, SINT_32 len, SINT_32 index)
{ SINT_32 value; if (index < len) { value = array[index]; } else { value = -1; }
} [/INST] The error is Incorrect array index validation. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <string.h>
void static_067(UINT_32 p_1)
{ UINT_32 local_x = 0;
#define BLOCKDEF ""test"" local_x = strlen(BLOCKDEF);
} [/INST] The error is #define used in a block. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#define MAX_SIZE 64
void SDA_141( char * input )
{ if (strlen(input) > MAX_SIZE) { printf(""Input string too long""); } else { UINT_32 index = 5U; UINT_32 i; char *buffer = (char *)malloc(MAX_SIZE); for (i = 0U; i < strlen(input); i++) { buffer[index++] = input[i]; } }
} [/INST] The error is Heap-based array index not checked before use. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static BOOL SDA_151( void )
{ BOOL flag; flag = FALSE; flag = TRUE; return flag;
}
static BOOL SDA_151_1( void )
{ BOOL flag = FALSE; flag = TRUE; return flag;
} [/INST] The error is DD data flow anomaly found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 xref_1;
static void xref_001 ( void )
{ ;
} [/INST] The error is Declaration types do not match across a system. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
SINT_32 xref_1; [/INST] The error is Declaration types do not match across a system. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 xref_1;
SINT_32 xref_1;
void xref_002(void)
{
} [/INST] The error is Ambiguous declaration of variable. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
SINT_32 g_var = 1; /* not compliant - g_var */
static void XREF_003( SINT_32 p_var )
{ SINT_32 result1 = p_var; /* not compliant - result1 */ SINT_32 result2; result2 = p_var; /* result2 later used, so compliant */ SINT_32 result3; result3 = result2; /* not compliant - result3 */
} [/INST] The error is Variable has only one use. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(void);
void bar(void);
void bar(void)
{ struct stag_name { UINT_32 us1; UINT_32 us2; } sobj1; struct stag_name sobj2 = {1, 2};
}
void foo(void)
{ struct stag_name { SINT_32 ss1; CHAR ch1; } sobj3;
} [/INST] The error is Identifier reuse: struct/union tag repeated. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
union utag_name
{ SINT_32 us1; CHAR us2;
} uobj1;
union utag_name uobj2 = {0};
static void xref_001(void)
{ struct utag_name { UINT_32 ss1; UINT_32 ss2; } sobj1;
} [/INST] The error is Identifier reuse: struct vs union. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(void);
union utag_name
{ SINT_32 us1; CHAR us2;
} uobj1;
void foo(void)
{ enum utag_name { first, second } sobj1;
} [/INST] The error is Identifier reuse: struct/union tag vs enum tag. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <string.h>
#define BLOCKDEF ""test""
void static_68(void)
{ UINT_32 local_x = 0U; local_x = strlen(BLOCKDEF);
}
#undef BLOCKDEF [/INST] The error is #undef used </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void stag_name(void);
union stag_name
{ SINT_32 us1; CHAR us2;
} uobj1;
void stag_name(void)
{
} [/INST] The error is Identifier reuse: tag vs procedure. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(UINT_32 utag_name);
union utag_name
{ SINT_32 us1; CHAR us2;
} uobj1;
void foo(UINT_32 utag_name)
{
} [/INST] The error is Identifier reuse: tag vs typedef. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(void);
union utag_name
{ SINT_32 us1; CHAR us2;
} uobj1;
void foo(void)
{ UINT_32 utag_name;
} [/INST] The error is Identifier reuse: tag vs variable. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
union utag_name
{ SINT_32 us1; CHAR us2;
} uobj1;
void xref_10(void)
{
utag_name: uobj1.us1 = 0;
} [/INST] The error is Identifier reuse: tag vs label (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef double utag_name;
union utag_name
{ SINT_32 us1; CHAR us2;
} uobj1;
static void xref_011 ( void )
{
} [/INST] The error is Identifier reuse: tag vs typedef. </s>"
"<s>[INST] find the error in this code: #define s_tag2 sn1
#include ""c_standards.h""
typedef struct s_tag
{ UINT_32 comp1; UINT_32 comp2;
} s_type; [/INST] The error is Identifier reuse: tag vs macro. </s>"
"<s>[INST] find the error in this code: #define s_tag sn2
#define u_tag sn3
#include ""c_standards.h""
typedef struct s_tag2
{ UINT_32 comp3; UINT_32 comp4;
} s_type2;
typedef union u_tag
{ SINT_32 us1; CHAR us2;
} u_type;
void xref_012 ( void )
{ ;
} [/INST] The error is Identifier reuse: tag vs macro. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef struct stag_name
{ UINT_32 comp1; UINT_32 comp2;
} stag_type;
void foo(void);
void foo(void)
{ struct sloctag_name { UINT_32 stag_name; } sobj1;
} [/INST] The error is Identifier reuse: tag vs component. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef struct s_name1_tag
{ UINT_32 comp1; UINT_32 comp2;
} s_name1_type;
typedef enum e_name1_tag
{ first, s_name1_tag
} e_name1_type;
void foo(void);
void foo(void)
{
} [/INST] The error is Identifier reuse: tag vs enum constant. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(void);
static UINT_32 static_var2;
void foo(void)
{ struct static_var2 { UINT_32 xx1; UINT_32 yy1; } ss1;
} [/INST] The error is Identifier reuse: persistent var vs tag. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#pragma MYERROR
static void static_69(void)
{ ;
} [/INST] The error is #pragma used. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef char t_name;
void foo(void);
void foo(void)
{ UINT_32 t_name;
} [/INST] The error is Identifier reuse: typedef vs variable. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void xref_17_1(void)
{ typedef char lab_name;
}
UINT_32 xref_17(void)
{ UINT_32 retval = 0;
lab_name: return retval;
} [/INST] The error is Identifier reuse: typedef vs label (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void xref_018_1(void)
{ typedef double t_name; t_name local_var;
}
void xref_018(void)
{ typedef char t_name; t_name local_var;
} [/INST] The error is Identifier reuse: typedef vs typedef. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef char t_name;
void foo(UINT_32 t_name);
void foo(UINT_32 t_name)
{
} [/INST] The error is Identifier reuse: typedef vs procedure parameter. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef double static_var1;
void foo(void);
void foo(void)
{ static UINT_32 static_var1;
} [/INST] The error is Identifier reuse: persistent var vs typedef. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef int s_tag;
#define s_tag sn1
static void xref_021 ( void )
{ ;
} [/INST] The error is Identifier reuse: typedef vs macro. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef struct my_struct_tag
{ UINT_32 comp1; UINT_32 t_name;
} my_struct_type;
typedef char t_name;
void foo(void);
void foo(void)
{
} [/INST] The error is Identifier reuse: typedef vs component. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(void);
void bar(void);
void foo(void)
{ typedef struct s_tag { UINT_32 comp1; UINT_32 comp2; } s_type;
}
void bar(void)
{ typedef enum e_tag { first, s_type } e_type;
} [/INST] The error is Identifier reuse: typedef vs enum constant. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void proc1(void);
void proc2(void);
void proc1(void)
{
}
void proc2(void)
{ typedef char proc1;
} [/INST] The error is Identifier reuse: typedef vs procedure. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void proc1(UINT_32 param, UINT_32 another_param);
static void proc1(UINT_32 param, UINT_32 another_param)
{
}
static void xref_25(UINT_32 proc1)
{
} [/INST] The error is Identifier reuse: procedure vs procedure param. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_70(UINT_32 * p1_ptr, UINT_32 * p2_ptr )
{ if ( p1_ptr > p2_ptr ) { }
} [/INST] The error is Logical comparison of pointers. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void xref_26_1(void)
{ static UINT_32 s_var;
}
UINT_32 xref_26(void)
{
s_var: return 0;
} [/INST] The error is Identifier reuse: persistent var vs label (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void xref_27(void);
UINT_32 p_var;
void xref_27(void)
{ static UINT_32 p_var;
} [/INST] The error is Identifier reuse: persist var vs persist var. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void xref_28(void);
UINT_32 var1;
void xref_28(void)
{ UINT_32 var1;
} [/INST] The error is Identifier reuse: persistent var vs var. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(void);
void xref_29(void);
void foo(void)
{
}
void xref_29(void)
{ static UINT_32 foo;
} [/INST] The error is Identifier reuse: persistent var vs procedure. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(UINT_32 pp);
void xref_30(void);
void foo(UINT_32 pp)
{
}
void xref_30(void)
{ static UINT_32 pp;
} [/INST] The error is Identifier reuse: persistent var vs proc param. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void xref_031 (UINT_32 pp)
{
} [/INST] The error is Identifier reuse: procedure vs procedure. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void xref_031 (void)
{
} [/INST] The error is Identifier reuse: procedure vs procedure. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(void);
void xref_32(void);
void foo(void)
{
}
void xref_32(void)
{ UINT_32 foo;
} [/INST] The error is Identifier reuse: procedure vs var </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(void)
{
}
UINT_32 xref_33(void)
{
foo: return 0;
} [/INST] The error is Identifier reuse: procedure vs label (MR) </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(void);
void foo()
{
} [/INST] The error is Identifier reuse: proc vs macro. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 *ptr;
UINT_32* static_71( void )
{ static UINT_32 w = 10u; UINT_32 local = 3U; UINT_32 *local_ptr = &local; ptr = &local; ptr = local_ptr; return &w;
} [/INST] The error is Pointer assignment to wider scope. </s>"
"<s>[INST] find the error in this code: #define foo sn1
#include ""c_standards.h""
void xref_34(void);
void xref_34()
{
} [/INST] The error is Identifier reuse: proc vs macro. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct s_tag
{ UINT_32 comp1; UINT_32 comp2;
} s_obj;
void comp1(void);
void comp1(void)
{
} [/INST] The error is Identifier reuse: proc vs component. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(void);
void xref_36(void);
void foo(void)
{
}
void xref_36(void)
{ enum e_tag { first, second, foo } e_obj;
} [/INST] The error is Identifier reuse: proc vs enum constant. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(void);
void foo(void)
{ static UINT_32 p_var = 0;
} [/INST] The error is Identifier reuse: persistent var vs macro. </s>"
"<s>[INST] find the error in this code: #define p_var sn1
#include ""c_standards.h""
void xref_37(void);
void xref_37(void)
{
} [/INST] The error is Identifier reuse: persistent var vs macro. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct s_tag
{ UINT_32 comp1; UINT_32 comp2;
} s_obj;
void xref_38(void);
void xref_38(void)
{ static UINT_32 comp1;
} [/INST] The error is Identifier reuse: persistent var vs component. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
enum e_tag
{ first, second
} e_obj;
void foo(void);
void xref_39(void)
{ static UINT_32 first;
} [/INST] The error is Identifier reuse: persistent var vs enum constant. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct s_tag
{ UINT_32 comp1; UINT_32 comp2;
} s_obj;
void foo(void);
void foo(void)
{ UINT_32 comp1;
} [/INST] The error is Identifier reuse: component vs var. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void xref_41_1(void)
{ UINT_32 u_var;
}
UINT_32 xref_41(void)
{
u_var: return 0;
} [/INST] The error is Identifier reuse: label vs variable (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct s_tag
{ UINT_32 comp1; UINT_32 comp2;
} s_obj;
void foo(UINT_32 comp2);
void foo(UINT_32 comp2)
{
} [/INST] The error is Identifier reuse: component vs procedure param. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct s_72 {SINT_32 x:1; };
void static_72( void)
{
} [/INST] The error is Signed bit field less than 2 bits wide. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void xref_43_1(UINT_32 u_var)
{
}
UINT_32 xref_43(void)
{
u_var: return 0;
} [/INST] The error is Identifier reuse: label vs procedure param (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct s_tag
{ UINT_32 comp1; UINT_32 comp2;
} s_obj;
enum e_tag
{ comp1, two
} e_obj;
void foo(void);
void foo(void)
{
} [/INST] The error is Identifier reuse: component vs enum constant. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct s_tag
{ UINT_32 lab1; UINT_32 comp2;
} s_obj;
UINT_32 xref_45(void)
{
lab1: return 0;
} [/INST] The error is Identifier reuse: component vs label (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
enum e_tag
{ lab1, second,
} e_obj;
UINT_32 xref_46(void)
{
lab1: return 0;
} [/INST] The error is Identifier reuse: label vs enum constant (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct s_tag
{ UINT_32 comp1; UINT_32 comp2;
} s_obj;
void foo(void);
void foo(void)
{
} [/INST] The error is Identifier reuse: component vs macro. </s>"
"<s>[INST] find the error in this code: #define comp2 sn1
#include ""c_standards.h""
void bar(void);
void bar(void)
{
} [/INST] The error is Identifier reuse: component vs macro. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 xref_48_1(void)
{
lab1: return 0;
} [/INST] The error is Identifier reuse: label vs macro (MR). </s>"
"<s>[INST] find the error in this code: #define lab1 sn1
#include ""c_standards.h""
void xref_48(void)
{
} [/INST] The error is Identifier reuse: label vs macro (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(UINT_32 pp);
void bar(void);
void foo(UINT_32 pp)
{
}
void bar(void)
{ UINT_32 pp;
} [/INST] The error is Identifier reuse: var vs proc param. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(void);
void foo(void)
{ UINT_32 loc_var = 0;
} [/INST] The error is Identifier reuse: var vs macro. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct s_73
{ UCHAR x:1;
};
void static_73(void)
{
} [/INST] The error is Bit field not signed or unsigned int. </s>"
"<s>[INST] find the error in this code: #define loc_var sn1
#include ""c_standards.h""
void bar(void);
void bar(void)
{
} [/INST] The error is Identifier reuse: var vs macro. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
enum e_tag
{ first, second
} e_obj;
void foo(void);
void foo(void)
{ UINT_32 first;
} [/INST] The error is Identifier reuse: var vs enum constant. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void proc1(UINT_32 param);
static void proc2(UINT_32 param);
static void proc1(UINT_32 param)
{
}
static void proc2(UINT_32 param)
{
} [/INST] The error is Identifier reuse: proc param vs proc param. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(UINT_32 param);
void foo(UINT_32 param)
{
} [/INST] The error is Identifier reuse: proc param vs macro. </s>"
"<s>[INST] find the error in this code: #define param sn1
#include ""c_standards.h""
void bar(void);
void bar(void)
{
} [/INST] The error is Identifier reuse: proc param vs macro. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(UINT_32 param);
void bar(void);
void foo(UINT_32 param)
{
}
void bar(void)
{ enum e_tag { first, second, param } e_obj;
} [/INST] The error is Identifier reuse: proc param vs enum constant. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 xref_55_1(void)
{
lab1: /***/ return 0;+A663
}
UINT_32 xref_55(void)
{
lab2: /***/ return 0;
} [/INST] The error is Identifier reuse: label vs label (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
enum e_tag
{ first, runnerup
} e_obj;
void foo(void);
void foo(void)
{
} [/INST] The error is Identifier reuse: macro vs enum constant. </s>"
"<s>[INST] find the error in this code: #define runnerup sn1
#include ""c_standards.h""
void bar(void);
void bar(void)
{
} [/INST] The error is Identifier reuse: macro vs enum constant. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct s_tag1
{ UINT_32 comp1; UINT_32 comp2;
} s_obj1;
struct s_tag2
{ UINT_32 comp1; UINT_32 comp3;
} s_obj2;
void xef_58(void);
void xef_58(void)
{
} [/INST] The error is Identifier reuse: component vs component </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_8 (void)
{ UINT_32 name_x = 1u; if (name_x == 0u) { } else ; if (name_x == 0u) { } else {
#if FALSE name_x = name_x + 1u;
#endif } if (name_x == 0u) { } else { ; }
} [/INST] The error is Empty else clause. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
union s_74{UCHAR fu; UINT_32 xu;};
void static_74(void)
{
} [/INST] The error is Union declared. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(void);
void bar(void);
void foo(void)
{ enum e_tag1 { first, runnerup } e_obj1;
}
void bar(void)
{ enum e_tag2 { first, second } e_obj2;
} [/INST] The error is Identifier reuse: enum constant vs enum constant. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void foo(void);
void bar(void);
void foo(void)
{ UINT_32 local_var = 0;
}
void bar(void)
{ UINT_32 local_var = 0;
} [/INST] The error is Identifier reuse: variable vs variable. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 global_variable_with_long_name1x;
UINT_32 global_variable_with_long_name1y;
void XREF_061(void)
{
} [/INST] The error is Identifier match in *** chars. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef unsigned int ANOTHER_UINT_32;
ANOTHER_UINT_32 xref_62(void);
UINT_32 xref_62(void)
{ UINT_32 ret_val = 0; return ret_val;
} [/INST] The error is Function prototype/defn return type mismatch (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
typedef unsigned int ANOTHER_UINT_32;
UINT_32 xref_63(ANOTHER_UINT_32 p1);
UINT_32 xref_63(UINT_32 p1)
{ UINT_32 ret_val = p1; return ret_val;
} [/INST] The error is Function prototype/defn param type mismatch (MR) </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static INT_32 indexArray ( const INT_32 array [] )
{ return array[4];
}
INT_32 XREF_064 ( void )
{ INT_32 array[3] = {1, 2, 3}; return indexArray( array );
} [/INST] The error is Array bound exceeded at call. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void XREF_065 ( void )
{ INT_32 j = -1; INT_32 i; for ( i = 0; i != 10 && j != i; ++i ) { if ( ( i % 2 ) == 0 ) { continue; } ++j; }
} [/INST] The error is continue in ill-formed loop (MR). </s>"
"<s>[INST] find the error in this code: void copy (char src_array[])
{ char dest_arr[3]; (void) strcpy (dest_arr, src_array);
}
void XREF_066 ( void )
{ char arrc[10]; copy(arrc);
}
int main ( void )
{ XREF_066 ( );
} [/INST] The error is Insufficient array space at call. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void xref_67( void );
static void xref_67 ( void )
{ INT_32 id1_a_bc; INT_32 id1_ab_c; INT_32 id2_ii; INT_32 id2_11; INT_32 id3_i0; INT_32 id3_1O; INT_32 id4_in; INT_32 id4_1h; INT_32 id5_Z5; INT_32 id5_2S; INT_32 id6_ZS; INT_32 id6_25; ;
} [/INST] The error is Identifier is typographically ambiguous. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static INT_32 index_too_large ( UINT_32 index )
{ INT_32 array[10] = {0}; return array[index];
}
INT_32 XREF_068( void )
{ return index_too_large( 20U );
} [/INST] The error is Parameter indexing array too big at call. </s>"
"<s>[INST] find the error in this code: void static_75(void)
{
#include ""c_standards.h""
} [/INST] The error is Executable code before an included file. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 array[3] = {1, 2, 3};
INT_32 XREF_069 ( void )
{ return array[3];
} [/INST] The error is Global array bound exceeded at use. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
void copy (char *dest_array)
{ char src_array[8] = ""abcdefg""; (void) strcpy (dest_array, src_array);
}
void XREF_070 ( void )
{ char arr_3[3]; copy(arr_3);
}
int main ( void )
{ XREF_070 ( );
} [/INST] The error is Array has insufficient space. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <string.h>
void copy (char *dest_array, char *src_array)
{ (void) strcpy (dest_array, src_array);
}
void XREF_071 ( void )
{ char arr_3[3]; char src_array[8] = ""abcdefg""; copy(arr_3, src_array);
}
int main ( void )
{ XREF_071 ( );
} [/INST] The error is Insufficient space for copy. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static INT_32 XREF_072 ( INT_32 index )
{ INT_32 array[10] = {0}; return array[index];
}
#define OFFSET 12
INT_32 main ( void )
{ return XREF_072(10-OFFSET);
} [/INST] The error is Parameter indexing array too small at call. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void proc(UCHAR p1)
{ UCHAR res; res = p1 >> 3;
}
void XREF_O73( void )
{ proc(7U);
} [/INST] The error is Bits discarded in >> by parameter in function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void proc(UCHAR p1)
{ UCHAR res; res = 15U << p1;
}
void XREF_O74( void )
{ proc(7U);
} [/INST] The error is Bits discarded in << by parameter in function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void proc(UCHAR p1)
{ UCHAR res; res = 3U >> p1;
}
void XREF_O75( void )
{ proc(7U);
} [/INST] The error is Bits discarded in >> by parameter in function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void proc(UCHAR p1)
{ UCHAR res; res = p1 << 6;
}
void XREF_O76( void )
{ proc(15U);
} [/INST] The error is Bits discarded in << on parameter in function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void proc(UCHAR p1, UCHAR p2)
{ UCHAR res; res = p1 >> p2;
}
void XREF_O77( void )
{ proc(3U, 7U);
} [/INST] The error is Bits discarded in >> between parameters in function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void proc(UCHAR p1, UCHAR p2)
{ UCHAR res; res = p1 << p2;
}
void XREF_O78( void )
{ proc(3U, 7U);
} [/INST] The error is Bits discarded in << between parameters in function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void dummy(CHAR *p_1, CHAR *p_2)
{
}
#define SetVariable( Variable, Value ) ( dummy(NewString##Variable, #Value ))
void static_76(void)
{ CHAR NewString1[128]; INT_32 value = 10; SetVariable(1, value );
} [/INST] The error is More than one of # or ## in a macro. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <string.h>
static void check_dest(SINT_32 len1)
{ SINT_32 src1[40]; SINT_32 tgt1[12]; memcpy(tgt1, src1, len1);
}
static void check_src(SINT_32 len2)
{ SINT_32 src2[12]; SINT_32 tgt2[40]; memcpy(tgt2, src2, len2);
}
static void XREF_079( void )
{ check_dest(12 * 4); check_dest(40 * 4); check_src(12 * 4); check_src(40 * 4);
} [/INST] The error is Size mismatch in memcpy/memset. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static const SINT_32 FIVE = 5;
static const SINT_32 SIX = 6;
static void div(SINT_32 divisor)
{ SINT_32 i = 7; i = i / divisor;
}
static void call_div(SINT_32 num)
{ div(num);
}
static void XREF_080( void )
{ call_div( SIX - 5 ); call_div( FIVE - 5 );
} [/INST] The error is Divide by zero found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 InfoFlow001( void )
{ UINT_32 result = 0; UINT_32 if_1 = 0; return (result);
} [/INST] The error is Local variables contribute nothing to results. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static UINT_32 glob = 0U;
BOOL Test1( UINT_32 Position, UINT_32 *Won )
{ if ( Position == 1U ) { *Won = *Won + 1; } return ( Position == 1U );
}
INT_32 Test2 ( void )
{ glob = 3; return glob;
}
INT_32 Test3 ( void )
{ return glob;
}
void QUALREP_001( UINT_32 RacePosition, BOOL sofar )
{ BOOL bWonAll = TRUE; UINT_32 WonCount = 0U; bWonAll = sofar && ( Test1( RacePosition, &WonCount ) ) ; WonCount = Test2() + Test3();
} [/INST] The error is Call has execution order dependant side effects. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
BOOL isHexDigit( CHAR TestChar )
{ BOOL bResult; bResult = FALSE; if ((TestChar == '0') || (TestChar == '1') || (TestChar == '2') || (TestChar == '3') || (TestChar == '4') || (TestChar == '5') || (TestChar == '6') || (TestChar == '7') || (TestChar == '8') || (TestChar == '9') || (TestChar == 'A') || (TestChar == 'a') || (TestChar == 'B') || (TestChar == 'b') || (TestChar == 'C') || (TestChar == 'c') || (TestChar == 'D') || (TestChar == 'd') || (TestChar == 'E') || (TestChar == 'e') || (TestChar == 'F') || (TestChar == 'f')) { bResult = TRUE; } return bResult;
} [/INST] The error is LCSAJ density exceeds *** </s>"
"<s>[INST] find the error in this code: #include ""C:\Testbed\Examples\Standards\C\Violations\Quality_report\c_standards.h""
#include <sys/limits.h>
void QUALREP_004(void)
{
} [/INST] The error is Included file has path. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void unreachable_fn ( void )
{ ;
}
UINT_32 j_001 (BOOL param)
{ UINT_32 local_var; void (*fnptr) (void); fnptr = & unreachable_fn; if (param == TRUE ) { local_var = param; } else { local_var = 0U; } if ( 0 ) { fnptr(); } return local_var; return 0;
} [/INST] The error is Unreachable Code found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 j_002 (BOOL param)
{ UINT_32 local_var; if (param == TRUE ) { local_var = param; } else { local_var = 0U; } return local_var; return 0;
} [/INST] The error is Unused inspect annotation. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static INT_32 proc( void )
{ return 1;
}
void j_003 ( void )
{ return; (void)proc();
} [/INST] The error is All internal linkage calls unreachable. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define increment_NOK(a) ( a ) + 1
#define increment_OK(b) ( ( b ) + 1 )
void static_77(void)
{ INT_32 result = 1; result = increment_NOK(result) * 3; result = 1; result = increment_OK(result) * 3;
} [/INST] The error is Macro replacement list needs parentheses. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
INT_32 myglobal;
INT_32 g_var1;
void hungarian_1 ( void )
{ ;
} [/INST] The error is Global Variable does not conform to style g_<name>. </s>"
"<s>[INST] find the error in this code: enum EColour {e_Red, blue, e_white };
void hungarian_3 ( void )
{ enum EColour flag;
} [/INST] The error is Enum Element does not conform to style e_<name>. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void hungarian_6 ( INT_32 *p_x, INT_32 *my_ptr )
{ ;
} [/INST] The error is Pointer does not conform to style p_<name>. </s>"
"<s>[INST] find the error in this code: enum Colour {e_red, e_blue, e_white };
enum Etraffic{ e_green, e_yellow, e_red };
void hungarian_7 ( void )
{ enum Colour flag; enum Etraffic light;
} [/INST] The error is Enum Name does not conform to style E<name>. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void Hungarian_nok ( void )
{ ;
}
void Hungarian_008_ok ( void )
{ ;
} [/INST] The error is Global Func Name does not conform to style <file>_<name>. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
_Atomic INT_32 atomic_var = 65;
_Noreturn void SV_15 ( INT_32 i )
{ if ( i > 0 ) { exit( i ); }
} [/INST] The error is Use of banned keyword. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
void SF_1 ( void )
{ SINT_32 the_seed = 17; SINT_32 x = rand(); SINT_32 y = rand_r(&the_seed);
} [/INST] The error is Function restricted by POSIX Safety Profile substitution. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <unistd.h>
void SF_2(void)
{ SINT_32 res; char *name; SINT_32 the_mode; res = access(name, the_mode);
} [/INST] The error is Function restricted by POSIX Safety Profile substitution. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
void SF_3(void)
{ SINT_32 the_status = 1; _exit(the_status);
} [/INST] The error is Use of FACE Security Profile excluded function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <math.h>
void SF_4(void)
{ float inpf; float outf; double inpd; double outd; outf = acosf(inpf); outd = acos(inpd);
} [/INST] The error is Use of FACE Safety Base Profile excluded function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define multiply(a1, a2) ((a1)*a2)
static void static_78(void)
{ SINT_32 test; SINT_32 p1 = 2; SINT_32 p2 = 5; test = ( multiply(100,p1) ); test = ( multiply(100,p1-p2) );
} [/INST] The error is Use of FACE Safety Extended Profile excluded function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <libgen.h>
void SF_5(void)
{ char *name; char *the_path; name = basename(the_path);
} [/INST] The error is Use of FACE General Purpose Profile excluded function. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <sys/socket.h>
void SF_6(void)
{ SINT_32 soc; soc = socket(AF_INET, SOCK_DGRAM, 0);
} [/INST] The error is Use of POSIX function restricted to IOSS/TSS segments. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include ""apex_types.h""
struct myMessage
{ SINT_32 id; SINT_64 value;
};
void SF_7(void)
{ APEX_INTEGER pid; struct myMessage msg; RETURN_CODE_TYPE ret; CREATE_QUEUING_PORT ( ""myQuePort"", sizeof (struct myMessage), 3, SOURCE, FIFO, &(pid), &(ret));
} [/INST] The error is Use of ARINC 653 function restricted to IOSS/TSS segments. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
#include <mqueue.h>
#define MAX_SIZE 1024
void SF_8(void)
{ mqd_t dest_q; char msg[MAX_SIZE] = ""Some Message""; SINT_32 ret; dest_q = mq_open(""/test_queue"", O_WRONLY); ret = mq_send(dest_q, msg, MAX_SIZE, 0);
} [/INST] The error is Safety Profile use of message queue API needs inspection. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#include <stdlib.h>
#pragma pack(4)
void SF_9(void)
{ ;
} [/INST] The error is Use of data structure pragmas. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define t void
t static_79(t)
{
} [/INST] The error is Macro contains unacceptable items. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_80(void)
{ UINT_32 array[10] = {0}; UINT_32 * p1_ptr, **p2_ptr; UINT_32 *** p3_ptr; UINT_32 w; p1_ptr = array; p2_ptr = &p1_ptr; p3_ptr = &p2_ptr; w = ***p3_ptr;
} [/INST] The error is Pointer indirection exceeds 2 levels. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_81(void)
??<
} [/INST] The error is Use of trigraph. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_82(void)
{ wchar_t WideChar = L'1';
} [/INST] The error is Use of wide string literal. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_83(void)
{ UINT_32 i; i = (UINT_32) 076;
} [/INST] The error is Octal number found. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
BOOL static_9(BOOL test)
{ BOOL result,flag; result = ( flag = test ); return result;
} [/INST] The error is Assignment operation in expression. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_84(void)
{ register SINT_32 ri = 0;
} [/INST] The error is Register variable declared. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_85(void)
{ enum E_type { num1, num2 = 2, num3}; /* ... */
} [/INST] The error is Incomplete initialisation of enumerator. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
#define FILE UINT_32
void static_86(void)
{ /* ... */
} [/INST] The error is Attempt to define reserved word. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_87(void)
{ UINT_32 w; UINT_32 array[5]; UINT_32 * p1_ptr; p1_ptr = array; w = *(p1_ptr + 8);
} [/INST] The error is Use of pointer arithmetic. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_88(void)
{ UINT_32 x; x=0; _asm { mov eax,x }
} [/INST] The error is Procedure is not pure assembler. </s>"
"<s>[INST] find the error in this code: void use_char ( char notok )
{ ; }
void static_89 ( void )
{ char num = 42; /* ... */
} [/INST] The error is char type not signed or unsigned. </s>"
"<s>[INST] find the error in this code: #include <wchar.h>
unsigned int static_90 (void)
{ char ch; unsigned char uc; unsigned int ui_32; unsigned short ui_16; int i_32; float f_32; double f_64; signed char sc; wchar_t wc; return ui_32;
} [/INST] The error is Basic type declaration used. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct s_91
{ UINT_32 s_91; UINT_32 u_1;
};
UINT_32 static_91 (void)
{ UINT_32 var_1;
static_91: var_1 = 1; return (var_1);
} [/INST] The error is Name redeclared in another C name space (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 duplicate = 0;
void static_92 (void)
{ enum Name_type { e1, duplicate } EnumVar; EnumVar = e1; /* ... */
} [/INST] The error is Duplicate use of a name in an enumeration. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_97(void)
{ SINT_32 sx; SINT_32 sy = 10; sx = (SINT_32)sy; sx = (SINT_32)(5 + 4);
} [/INST] The error is Use of redundant cast. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
SINT_32 static_11( void )
{ SINT_32 j = 10; SINT_32 k = 0; for (k = 0; k < 10; k = k + 1) j--; return j;
} [/INST] The error is No brackets to loop body (added by Testbed). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void fn( UINT_16 p_1, UINT_16 p_2 )
{ ; /* ... */
}
void static_98(UINT_32 p_1, UINT_16 p_2)
{ fn(p_1, p_2);
} [/INST] The error is Actual and formal parameters inconsistent (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
BOOL test_99(void)
{ BOOL retval= TRUE; /* ... */ return retval;}
void static_99(void)
{ if ( test_99 ) { /* ... */ }
} [/INST] The error is Function use is not a call. </s>"
"<s>[INST] find the error in this code: #include <\ctype.h>
static void static_100(void)
{ /* ... */
} [/INST] The error is #include filename is non conformant. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 static_101( UINT_32 par_1)
{ switch (par_1) { case 0: return (-1); break; case 1: return (2U); break; case 2: return (2L); break; case 2: return (2UL); break; case 4: return (2.0f); break; default: break; }
} [/INST] The error is Function return type inconsistent. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
UINT_32 static_102(UINT_32 p_1, UINT_16 p_2);
SINT_32 static_102(UINT_32 p_1, UINT_16 p_2)
{ SINT_32 result = 0; return result;
} [/INST] The error is Function and prototype return inconsistent (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
BOOL static_103(FLOAT_32 up_1);
BOOL static_103(UINT_32 up_1)
{ BOOL ret = FALSE; /* ... */ return ret;
} [/INST] The error is Function and prototype param inconsistent (MR). </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct s_type_a { SINT_32 xs; FLOAT_32 fs;};
void static_104(void)
{ struct s_type_a sta = {3.14F, 0.0f};
} [/INST] The error is Struct field initialisation incorrect. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
struct pixel{ UINT_32 colour; struct {UINT_32 x, y;} coords; };
void static_105(void)
{ UINT_32 xs = 0; UINT_32 ys = 0; struct pixel spot = {1u, xs, ys };
} [/INST] The error is Initialisation brace { } fault. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
void static_106(void)
{ volatile UINT_32 v = 1U; UINT_32 x = 0; x = v;
} [/INST] The error is Volatile declaration. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_107( BOOL flag )
{ UINT_16 u16 = 2U; UINT_32 u32 = 3U; FLOAT_32 f32 = 4.0F; x = (flag ? f32 : u32); x = (flag ? u32 : u16);
} [/INST] The error is Type mismatch in ternary expression. </s>"
"<s>[INST] find the error in this code: #include ""c_standards.h""
static void static_107( BOOL flag )
{ UINT_16 u16 = 2U; UINT_32 u32 = 3U; FLOAT_32 f32 = 4.0F; x = (flag ? f32 : u32); x = (flag ? u32 : u16);
} [/INST] The error is Type mismatch in ternary expression. </s>"