Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable -Wnewline-eof #4896

Merged
merged 1 commit into from Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Expand Up @@ -241,6 +241,11 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU|AppleClang|Clang")
message(STATUS "Compiler does not support -Wimplicit-fallthrough")
endif()

check_c_compiler_flag(-Wnewline-eof CC_SUPPORTS_NEWLINE_EOF)
if(CC_SUPPORTS_NEWLINE_EOF)
add_compile_options(-Wnewline-eof)
endif()

# strict overflow check produces false positives on gcc < 8
if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS 8)
add_compile_options(-Wno-strict-overflow)
Expand Down
2 changes: 1 addition & 1 deletion src/loader/function_telemetry.c
Expand Up @@ -66,4 +66,4 @@ ts_function_telemetry_shmem_alloc()
Size size = hash_estimate_size(FN_TELEMETRY_HASH_SIZE, sizeof(FnTelemetryHashEntry));
RequestAddinShmemSpace(add_size(size, sizeof(LWLock *)));
RequestNamedLWLockTranche(FN_TELEMETRY_LWLOCK_TRANCHE_NAME, 1);
}
}
2 changes: 1 addition & 1 deletion src/loader/function_telemetry.h
Expand Up @@ -27,4 +27,4 @@ extern void ts_function_telemetry_shmem_startup(void);

extern void ts_function_telemetry_shmem_alloc(void);

#endif /* TIMESCALEDB_LOADER_FUNCTION_TELEMETRY_H */
#endif /* TIMESCALEDB_LOADER_FUNCTION_TELEMETRY_H */