Skip to content

Commit

Permalink
Make incompatible pointer types an error. (#9805)
Browse files Browse the repository at this point in the history
  - For anything we build inside OMCompiler/, excluding OMCompiler/3rdParty,
    for the incompatible pointer types warning to error.

  - Fix unmatched buffer size in `gbode_util.c`

  - Rename the `clang-qt5` stage to `clang-qt5-omedit-testsuite`
  • Loading branch information
mahge committed Nov 29, 2022
1 parent 207c5f0 commit 2295654
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Expand Up @@ -701,7 +701,7 @@ pipeline {
stash name: 'cross-fmu-results-armhf', includes: 'testsuite/special/FmuExportCrossCompile/*.csv, testsuite/special/FmuExportCrossCompile/Test_FMUs/**'
}
}
stage('clang-qt5') {
stage('clang-qt5-omedit-testsuite') {
agent {
docker {
image 'docker.openmodelica.org/build-deps:v1.16.3'
Expand Down
3 changes: 2 additions & 1 deletion OMCompiler/CMakeLists.txt
Expand Up @@ -54,7 +54,8 @@ omc_add_subdirectory(3rdParty)
# We do this after 3rdParty is added!! because some libs in FMILib use implicit function declaration
# because of missing #defines due to bad configuration for now.
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
add_compile_options($<$<COMPILE_LANGUAGE:C>:-Werror=implicit-function-declaration>)
add_compile_options($<$<COMPILE_LANGUAGE:C>:-Werror=implicit-function-declaration>)
add_compile_options($<$<COMPILE_LANGUAGE:C>:-Werror=incompatible-pointer-types>)
endif()

omc_add_subdirectory(SimulationRuntime)
Expand Down
Expand Up @@ -651,7 +651,7 @@ void dumpFastStates_gb(DATA_GBODE* gbData, modelica_boolean event, double time,
* -1 <= step is preliminary accepted but needs refinement
*/
void dumpFastStates_gbf(DATA_GBODE* gbData, double time, int rejectedType) {
char fastStates_row[4096];
char fastStates_row[40960];
unsigned int bufSize = 40960;
unsigned int ct;
int i, ii;
Expand Down
2 changes: 1 addition & 1 deletion OMCompiler/SimulationRuntime/c/util/omc_msvc.c
Expand Up @@ -313,7 +313,7 @@ int omc_dladdr(void *addr, Dl_info *info)
{
HANDLE hProcess;
DWORD dwModuleBase;
DWORD displacement;
DWORD64 displacement;
char sModuleName[MAX_PATH + 1];
sModuleName[MAX_PATH] = '\0';

Expand Down

0 comments on commit 2295654

Please sign in to comment.