text
stringlengths
115
796
<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>