Skip to content

Commit 675daae

Browse files
committed
Fix prototype error with header on clang
Fix these errors reported by clang: ``` FAILED: [code=1] test/c99_header.p/test.c.o clang -Itest/c99_header.p -Itest -I../test -I../include -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -std=c99 -O3 -pedantic -MD -MQ test/c99_header.p/test.c.o -MF test/c99_header.p/test.c.o.d -o test/c99_header.p/test.c.o -c ../test/test.c In file included from ../test/test.c:2: ../include/ffms.h:436:30: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 436 | FFMS_API(int) FFMS_GetVersion(); | ^ | void ../include/ffms.h:437:31: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 437 | FFMS_API(int) FFMS_GetLogLevel(); | ^ | void ```
1 parent 26dc348 commit 675daae

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

include/ffms.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,8 @@ typedef int (FFMS_CC *TIndexCallback)(int64_t Current, int64_t Total, void *ICPr
433433
/* Most functions return 0 on success */
434434
/* Functions without error message output can be assumed to never fail in a graceful way */
435435
FFMS_API(void) FFMS_Init(int, int); /* Pass 0 to both arguments, kept to partially preserve abi */
436-
FFMS_API(int) FFMS_GetVersion();
437-
FFMS_API(int) FFMS_GetLogLevel();
436+
FFMS_API(int) FFMS_GetVersion(void);
437+
FFMS_API(int) FFMS_GetLogLevel(void);
438438
FFMS_API(void) FFMS_SetLogLevel(int Level);
439439
FFMS_API(FFMS_VideoSource *) FFMS_CreateVideoSource(const char *SourceFile, int Track, FFMS_Index *Index, int Threads, int SeekMode, FFMS_ErrorInfo *ErrorInfo);
440440
FFMS_API(FFMS_AudioSource *) FFMS_CreateAudioSource(const char *SourceFile, int Track, FFMS_Index *Index, int DelayMode, FFMS_ErrorInfo *ErrorInfo);

src/core/ffms.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ FFMS_API(void) FFMS_Init(int, int) {
8787
});
8888
}
8989

90-
FFMS_API(int) FFMS_GetVersion() {
90+
FFMS_API(int) FFMS_GetVersion(void) {
9191
return FFMS_VERSION;
9292
}
9393

94-
FFMS_API(int) FFMS_GetLogLevel() {
94+
FFMS_API(int) FFMS_GetLogLevel(void) {
9595
return av_log_get_level();
9696
}
9797

0 commit comments

Comments
 (0)