Add cppcheck and sync common code#23
Conversation
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
| break; | ||
| case F_FLOAT: | ||
| *(float *)(b + f->ofs) = atof(value); | ||
| *(float *)(b + f->ofs) = (float)strtod(value, (char **)NULL); |
Check warning
Code scanning / CppCheck
Casting between unsigned char * and float * which have an incompatible binary data representation. Medium
| edict_t *ent; | ||
| int inhibit; | ||
| char *com_token; | ||
| const char *com_token; |
Check warning
Code scanning / CppCheck
The scope of the variable 'com_token' can be reduced. Medium
| int BoxOnPlaneSide(vec3_t emins, vec3_t emaxs, struct cplane_s *plane); | ||
| void AngleVectors(const vec3_t angles, vec3_t forward, vec3_t right, vec3_t up); | ||
| void AngleVectors2(const vec3_t value1, vec3_t angles); | ||
| int BoxOnPlaneSide(const vec3_t emins, const vec3_t emaxs, const struct cplane_s *plane); |
Check warning
Code scanning / CppCheck
Function 'BoxOnPlaneSide' argument 3 names different: declaration 'plane' definition 'p'. Medium
| int Q_strncasecmp(char *s1, char *s2, int n); | ||
| int Q_strcasecmp(const char *s1, const char *s2); | ||
| int Q_strncasecmp(const char *s1, const char *s2, int n); | ||
| char *Q_strcasestr(const char *s1, const char *s2); |
Check warning
Code scanning / CppCheck
Function 'Q_strcasestr' argument 1 names different: declaration 's1' definition 'haystack'. Medium
| int Q_strncasecmp(char *s1, char *s2, int n); | ||
| int Q_strcasecmp(const char *s1, const char *s2); | ||
| int Q_strncasecmp(const char *s1, const char *s2, int n); | ||
| char *Q_strcasestr(const char *s1, const char *s2); |
Check warning
Code scanning / CppCheck
Function 'Q_strcasestr' argument 2 names different: declaration 's2' definition 'needle'. Medium
| static char value[2][MAX_INFO_VALUE]; | ||
| static int valueindex = 0; | ||
|
|
||
| const char *kstart, *vstart; |
Check warning
Code scanning / CppCheck
The scope of the variable 'kstart' can be reduced. Medium
| * ======================================================================= | ||
| */ | ||
|
|
||
| #include <ctype.h> |
Check notice
Code scanning / CppCheck
Include file: <ctype.h> not found. Please note: Standard library headers do not need to be provided to get proper results. Note
| #include <ctype.h> | ||
|
|
||
| #ifndef _MSC_VER | ||
| #include <strings.h> |
Check notice
Code scanning / CppCheck
Include file: <strings.h> not found. Please note: Standard library headers do not need to be provided to get proper results. Note
| return NULL; | ||
| } | ||
| #else | ||
| #include <sys/stat.h> |
Check notice
Code scanning / CppCheck
Include file: <sys/stat.h> not found. Please note: Standard library headers do not need to be provided to get proper results. Note
| } | ||
| #else | ||
| #include <sys/stat.h> | ||
| #include <errno.h> |
Check notice
Code scanning / CppCheck
Include file: <errno.h> not found. Please note: Standard library headers do not need to be provided to get proper results. Note
Sync shared/spawn/savegame.
Part of yquake2/yquake2#1289