mirror of
https://github.com/armink/EasyLogger.git
synced 2025-01-19 07:42:52 +08:00
[demo][linux] fix compile warning about old-style-declaration
In gcc 7.3.0, we encountered a warning error when compiling elog_file_port.c:76:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration] Put 'inline' in front of 'void' can fix it Signed-off-by: dubaowei <dubaowei@cetc.com>
This commit is contained in:
parent
10d2efdeb4
commit
0221c43648
@ -73,7 +73,7 @@ ElogErrCode elog_file_port_init(void) {
|
|||||||
/**
|
/**
|
||||||
* file log lock
|
* file log lock
|
||||||
*/
|
*/
|
||||||
void inline elog_file_port_lock(void)
|
inline void elog_file_port_lock(void)
|
||||||
{
|
{
|
||||||
semid == -1 ? -1 : semop(semid, (struct sembuf *)&down, 1);
|
semid == -1 ? -1 : semop(semid, (struct sembuf *)&down, 1);
|
||||||
}
|
}
|
||||||
@ -81,7 +81,7 @@ void inline elog_file_port_lock(void)
|
|||||||
/**
|
/**
|
||||||
* file log unlock
|
* file log unlock
|
||||||
*/
|
*/
|
||||||
void inline elog_file_port_unlock(void)
|
inline void elog_file_port_unlock(void)
|
||||||
{
|
{
|
||||||
semid == -1 ? -1 : semop(semid, (struct sembuf *)&up, 1);
|
semid == -1 ? -1 : semop(semid, (struct sembuf *)&up, 1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user