Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Administrator
Public Cpp Test
Commits
2a291a73
"...src/git@ustchcs.com:root/arthas.git" did not exist on "5d7c4150441db33ac01ea6e2d898eab9fb454efc"
Commit
2a291a73
authored
Oct 23, 2023
by
shengnan hu
Browse files
main
parents
Changes
638
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
536 additions
and
0 deletions
+536
-0
BM-GJB8114-2013/R-1-1-10/R-1-1-10-bad.c
BM-GJB8114-2013/R-1-1-10/R-1-1-10-bad.c
+16
-0
BM-GJB8114-2013/R-1-1-10/R-1-1-10-bad.cpp
BM-GJB8114-2013/R-1-1-10/R-1-1-10-bad.cpp
+16
-0
BM-GJB8114-2013/R-1-1-10/R-1-1-10-good.c
BM-GJB8114-2013/R-1-1-10/R-1-1-10-good.c
+16
-0
BM-GJB8114-2013/R-1-1-10/R-1-1-10-good.cpp
BM-GJB8114-2013/R-1-1-10/R-1-1-10-good.cpp
+16
-0
BM-GJB8114-2013/R-1-1-11/R-1-1-11-bad.c
BM-GJB8114-2013/R-1-1-11/R-1-1-11-bad.c
+17
-0
BM-GJB8114-2013/R-1-1-11/R-1-1-11-bad.cpp
BM-GJB8114-2013/R-1-1-11/R-1-1-11-bad.cpp
+17
-0
BM-GJB8114-2013/R-1-1-11/R-1-1-11-good.c
BM-GJB8114-2013/R-1-1-11/R-1-1-11-good.c
+17
-0
BM-GJB8114-2013/R-1-1-11/R-1-1-11-good.cpp
BM-GJB8114-2013/R-1-1-11/R-1-1-11-good.cpp
+17
-0
BM-GJB8114-2013/R-1-1-12/R-1-1-12-bad.c
BM-GJB8114-2013/R-1-1-12/R-1-1-12-bad.c
+27
-0
BM-GJB8114-2013/R-1-1-12/R-1-1-12-bad.cpp
BM-GJB8114-2013/R-1-1-12/R-1-1-12-bad.cpp
+27
-0
BM-GJB8114-2013/R-1-1-12/R-1-1-12-good.c
BM-GJB8114-2013/R-1-1-12/R-1-1-12-good.c
+27
-0
BM-GJB8114-2013/R-1-1-12/R-1-1-12-good.cpp
BM-GJB8114-2013/R-1-1-12/R-1-1-12-good.cpp
+27
-0
BM-GJB8114-2013/R-1-1-13/R-1-1-13-bad.c
BM-GJB8114-2013/R-1-1-13/R-1-1-13-bad.c
+32
-0
BM-GJB8114-2013/R-1-1-13/R-1-1-13-bad.cpp
BM-GJB8114-2013/R-1-1-13/R-1-1-13-bad.cpp
+32
-0
BM-GJB8114-2013/R-1-1-13/R-1-1-13-good.c
BM-GJB8114-2013/R-1-1-13/R-1-1-13-good.c
+32
-0
BM-GJB8114-2013/R-1-1-13/R-1-1-13-good.cpp
BM-GJB8114-2013/R-1-1-13/R-1-1-13-good.cpp
+32
-0
BM-GJB8114-2013/R-1-1-14/R-1-1-14-bad.c
BM-GJB8114-2013/R-1-1-14/R-1-1-14-bad.c
+42
-0
BM-GJB8114-2013/R-1-1-14/R-1-1-14-bad.cpp
BM-GJB8114-2013/R-1-1-14/R-1-1-14-bad.cpp
+42
-0
BM-GJB8114-2013/R-1-1-14/R-1-1-14-good.c
BM-GJB8114-2013/R-1-1-14/R-1-1-14-good.c
+42
-0
BM-GJB8114-2013/R-1-1-14/R-1-1-14-good.cpp
BM-GJB8114-2013/R-1-1-14/R-1-1-14-good.cpp
+42
-0
No files found.
BM-GJB8114-2013/R-1-1-10/R-1-1-10-bad.c
0 → 100644
View file @
2a291a73
typedef
struct
{
signed
int
si01
:
1
;
//违背1
signed
int
si02
:
2
;
unsigned
int
serv
:
29
;
}
sData
;
int
main
(
void
)
{
sData
my_data
;
my_data
.
si01
=
-
1
;
my_data
.
si02
=
-
1
;
return
(
0
);
}
BM-GJB8114-2013/R-1-1-10/R-1-1-10-bad.cpp
0 → 100644
View file @
2a291a73
typedef
struct
{
signed
int
si01
:
1
;
//违背1
signed
int
si02
:
2
;
unsigned
int
serv
:
29
;
}
sData
;
int
main
(
void
)
{
sData
my_data
;
my_data
.
si01
=
-
1
;
my_data
.
si02
=
-
1
;
return
(
0
);
}
BM-GJB8114-2013/R-1-1-10/R-1-1-10-good.c
0 → 100644
View file @
2a291a73
typedef
struct
{
signed
int
si01
:
2
;
//遵循1
signed
int
si02
:
2
;
unsigned
int
serv
:
28
;
}
sData
;
int
main
(
void
)
{
sData
my_data
;
my_data
.
si01
=
-
1
;
my_data
.
si02
=
-
1
;
return
(
0
);
}
BM-GJB8114-2013/R-1-1-10/R-1-1-10-good.cpp
0 → 100644
View file @
2a291a73
typedef
struct
{
signed
int
si01
:
2
;
//遵循1
signed
int
si02
:
2
;
unsigned
int
serv
:
28
;
}
sData
;
int
main
(
void
)
{
sData
my_data
;
my_data
.
si01
=
-
1
;
my_data
.
si02
=
-
1
;
return
(
0
);
}
BM-GJB8114-2013/R-1-1-11/R-1-1-11-bad.c
0 → 100644
View file @
2a291a73
typedef
struct
{
short
d01
:
2
;
//违背1
short
d02
:
2
;
//违背2
short
res
:
12
;
//违背3
}
sData
;
int
main
(
void
)
{
sData
my_data
;
my_data
.
d01
=
1
;
my_data
.
d02
=
1
;
my_data
.
res
=
0
;
return
(
0
);
}
BM-GJB8114-2013/R-1-1-11/R-1-1-11-bad.cpp
0 → 100644
View file @
2a291a73
typedef
struct
{
short
d01
:
2
;
//违背1
short
d02
:
2
;
//违背2
short
res
:
12
;
//违背3
}
sData
;
int
main
(
void
)
{
sData
my_data
;
my_data
.
d01
=
1
;
my_data
.
d02
=
1
;
my_data
.
res
=
0
;
return
(
0
);
}
BM-GJB8114-2013/R-1-1-11/R-1-1-11-good.c
0 → 100644
View file @
2a291a73
typedef
struct
{
signed
short
d01
:
2
;
//遵循1
unsigned
short
d02
:
2
;
//遵循2
unsigned
short
res
:
12
;
//遵循3
}
sData
;
int
main
(
void
)
{
sData
my_data
;
my_data
.
d01
=
1
;
my_data
.
d02
=
1
;
my_data
.
res
=
0
;
return
(
0
);
}
BM-GJB8114-2013/R-1-1-11/R-1-1-11-good.cpp
0 → 100644
View file @
2a291a73
typedef
struct
{
signed
short
d01
:
2
;
//遵循1
unsigned
short
d02
:
2
;
//遵循2
unsigned
short
res
:
12
;
//遵循3
}
sData
;
int
main
(
void
)
{
sData
my_data
;
my_data
.
d01
=
1
;
my_data
.
d02
=
1
;
my_data
.
res
=
0
;
return
(
0
);
}
BM-GJB8114-2013/R-1-1-12/R-1-1-12-bad.c
0 → 100644
View file @
2a291a73
typedef
struct
{
unsigned
char
d01
:
2
;
unsigned
char
d02
:
2
;
unsigned
char
d03
:
2
;
unsigned
short
d04
:
2
;
//违背1
}
stData1
;
typedef
struct
{
unsigned
short
d01
:
2
;
unsigned
short
d02
:
2
;
unsigned
short
d03
:
2
;
unsigned
short
d04
:
12
;
//违背2
unsigned
short
d05
:
2
;
unsigned
short
d06
:
2
;
unsigned
short
d07
:
2
;
unsigned
short
d08
:
8
;
}
stData2
;
int
main
(
void
)
{
stData1
my_data1
;
stData2
my_data2
;
return
(
0
);
}
BM-GJB8114-2013/R-1-1-12/R-1-1-12-bad.cpp
0 → 100644
View file @
2a291a73
typedef
struct
{
unsigned
char
d01
:
2
;
unsigned
char
d02
:
2
;
unsigned
char
d03
:
2
;
unsigned
short
d04
:
2
;
//违背1
}
stData1
;
typedef
struct
{
unsigned
short
d01
:
2
;
unsigned
short
d02
:
2
;
unsigned
short
d03
:
2
;
unsigned
short
d04
:
12
;
//违背2
unsigned
short
d05
:
2
;
unsigned
short
d06
:
2
;
unsigned
short
d07
:
2
;
unsigned
short
d08
:
8
;
}
stData2
;
int
main
(
void
)
{
stData1
my_data1
;
stData2
my_data2
;
return
(
0
);
}
BM-GJB8114-2013/R-1-1-12/R-1-1-12-good.c
0 → 100644
View file @
2a291a73
typedef
struct
{
unsigned
char
d01
:
2
;
unsigned
char
d02
:
2
;
unsigned
char
d03
:
2
;
unsigned
char
d04
:
2
;
//遵循1
}
stData1
;
typedef
struct
{
unsigned
short
d01
:
2
;
unsigned
short
d02
:
2
;
unsigned
short
d03
:
2
;
unsigned
short
d04
:
10
;
//遵循2
unsigned
short
d05
:
2
;
unsigned
short
d06
:
2
;
unsigned
short
d07
:
2
;
unsigned
short
d08
:
10
;
}
stData2
;
int
main
(
void
)
{
stData1
my_data1
;
stData2
my_data2
;
return
(
0
);
}
BM-GJB8114-2013/R-1-1-12/R-1-1-12-good.cpp
0 → 100644
View file @
2a291a73
typedef
struct
{
unsigned
char
d01
:
2
;
unsigned
char
d02
:
2
;
unsigned
char
d03
:
2
;
unsigned
char
d04
:
2
;
//遵循1
}
stData1
;
typedef
struct
{
unsigned
short
d01
:
2
;
unsigned
short
d02
:
2
;
unsigned
short
d03
:
2
;
unsigned
short
d04
:
10
;
//遵循2
unsigned
short
d05
:
2
;
unsigned
short
d06
:
2
;
unsigned
short
d07
:
2
;
unsigned
short
d08
:
10
;
}
stData2
;
int
main
(
void
)
{
stData1
my_data1
;
stData2
my_data2
;
return
(
0
);
}
BM-GJB8114-2013/R-1-1-13/R-1-1-13-bad.c
0 → 100644
View file @
2a291a73
int
fun1
(
);
//违背1
int
fun2
(
int
,
int
);
//违背2
int
main
(
void
)
{
int
a
,
b
,
c
,
d
;
a
=
10
;
b
=
5
;
c
=
fun1
(
a
,
b
);
d
=
fun2
(
a
,
b
);
return
(
0
);
}
int
fun1
(
int
a
,
int
b
)
{
int
ret
;
ret
=
a
+
b
;
return
ret
;
}
int
fun2
(
int
a
,
int
b
)
{
int
ret
;
ret
=
a
-
b
;
return
ret
;
}
BM-GJB8114-2013/R-1-1-13/R-1-1-13-bad.cpp
0 → 100644
View file @
2a291a73
int
fun1
(
);
//违背1
int
fun2
(
int
,
int
);
//违背2
int
main
(
void
)
{
int
a
,
b
,
c
,
d
;
a
=
10
;
b
=
5
;
c
=
fun1
(
a
,
b
);
d
=
fun2
(
a
,
b
);
return
(
0
);
}
int
fun1
(
int
a
,
int
b
)
{
int
ret
;
ret
=
a
+
b
;
return
ret
;
}
int
fun2
(
int
a
,
int
b
)
{
int
ret
;
ret
=
a
-
b
;
return
ret
;
}
BM-GJB8114-2013/R-1-1-13/R-1-1-13-good.c
0 → 100644
View file @
2a291a73
int
fun1
(
int
a
,
int
b
);
//遵循1
int
fun2
(
int
a
,
int
b
);
//遵循2
int
main
(
void
)
{
int
a
,
b
,
c
,
d
;
a
=
10
;
b
=
5
;
c
=
fun1
(
a
,
b
);
d
=
fun2
(
a
,
b
);
return
(
0
);
}
int
fun1
(
int
a
,
int
b
)
{
int
ret
;
ret
=
a
+
b
;
return
ret
;
}
int
fun2
(
int
a
,
int
b
)
{
int
ret
;
ret
=
a
-
b
;
return
ret
;
}
BM-GJB8114-2013/R-1-1-13/R-1-1-13-good.cpp
0 → 100644
View file @
2a291a73
int
fun1
(
int
a
,
int
b
);
//遵循1
int
fun2
(
int
a
,
int
b
);
//遵循2
int
main
(
void
)
{
int
a
,
b
,
c
,
d
;
a
=
10
;
b
=
5
;
c
=
fun1
(
a
,
b
);
d
=
fun2
(
a
,
b
);
return
(
0
);
}
int
fun1
(
int
a
,
int
b
)
{
int
ret
;
ret
=
a
+
b
;
return
ret
;
}
int
fun2
(
int
a
,
int
b
)
{
int
ret
;
ret
=
a
-
b
;
return
ret
;
}
BM-GJB8114-2013/R-1-1-14/R-1-1-14-bad.c
0 → 100644
View file @
2a291a73
int
fun1
(
short
height
);
//违背1
float
fun2
(
int
height
);
//违背2
int
fun3
(
int
height
);
//违背3
int
main
(
void
)
{
int
i
,
j1
,
j2
,
j3
;
i
=
1000
;
j1
=
fun1
(
i
);
j2
=
fun2
(
i
);
j3
=
fun3
(
i
);
return
(
0
);
}
int
fun1
(
int
height
)
{
int
h
;
h
=
height
+
10
;
return
h
;
}
int
fun2
(
int
height
)
{
int
h
;
h
=
height
-
10
;
return
h
;
}
int
fun3
(
int
width
)
{
int
w
;
w
=
width
-
10
;
return
w
;
}
BM-GJB8114-2013/R-1-1-14/R-1-1-14-bad.cpp
0 → 100644
View file @
2a291a73
int
fun1
(
short
height
);
//违背1
float
fun2
(
int
height
);
//违背2
int
fun3
(
int
height
);
//违背3
int
main
(
void
)
{
int
i
,
j1
,
j2
,
j3
;
i
=
1000
;
j1
=
fun1
(
i
);
j2
=
fun2
(
i
);
j3
=
fun3
(
i
);
return
(
0
);
}
int
fun1
(
int
height
)
{
int
h
;
h
=
height
+
10
;
return
h
;
}
int
fun2
(
int
height
)
{
int
h
;
h
=
height
-
10
;
return
h
;
}
int
fun3
(
int
width
)
{
int
w
;
w
=
width
-
10
;
return
w
;
}
BM-GJB8114-2013/R-1-1-14/R-1-1-14-good.c
0 → 100644
View file @
2a291a73
int
fun1
(
int
height
);
//遵循1
int
fun2
(
int
height
);
//遵循2
int
fun3
(
int
width
);
//遵循3
int
main
(
void
)
{
int
i
,
j1
,
j2
,
j3
;
i
=
1000
;
j1
=
fun1
(
i
);
j2
=
fun2
(
i
);
j3
=
fun3
(
i
);
return
(
0
);
}
int
fun1
(
int
height
)
{
int
h
;
h
=
height
+
10
;
return
h
;
}
int
fun2
(
int
height
)
{
int
h
;
h
=
height
-
10
;
return
h
;
}
int
fun3
(
int
width
)
{
int
w
;
w
=
width
-
10
;
return
w
;
}
BM-GJB8114-2013/R-1-1-14/R-1-1-14-good.cpp
0 → 100644
View file @
2a291a73
int
fun1
(
int
height
);
//遵循1
int
fun2
(
int
height
);
//遵循2
int
fun3
(
int
width
);
//遵循3
int
main
(
void
)
{
int
i
,
j1
,
j2
,
j3
;
i
=
1000
;
j1
=
fun1
(
i
);
j2
=
fun2
(
i
);
j3
=
fun3
(
i
);
return
(
0
);
}
int
fun1
(
int
height
)
{
int
h
;
h
=
height
+
10
;
return
h
;
}
int
fun2
(
int
height
)
{
int
h
;
h
=
height
-
10
;
return
h
;
}
int
fun3
(
int
width
)
{
int
w
;
w
=
width
-
10
;
return
w
;
}
Prev
1
2
3
4
5
6
…
32
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment