Jan Willamowius
2019-04-22 51213b102296c1e48f25aa9472a8be74a31cb6b7
fix gcc 5.4 warnings
4个文件已修改
10 ■■■■ 已修改文件
src/library/base/logger.c 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/library/base/logger.h 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/library/os/os.h 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/library/pc-identifiers.c 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/library/base/logger.c
@@ -41,7 +41,7 @@
#endif
}
void _log(char* format, ...) {
void _log(const char* format, ...) {
    char logpath[MAX_PATH];
    va_list args;
    char * buffer;
src/library/base/logger.h
@@ -25,7 +25,7 @@
#define LOG_ERROR(M, ...)
#endif
void _log(char* format, ...);
void _log(const char* format, ...);
void _shutdown_log();
#ifdef __cplusplus
src/library/os/os.h
@@ -14,6 +14,10 @@
#include "../base/base.h"
#include <stddef.h>
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <unistd.h>
//definition of size_t
#include <stdlib.h>
#ifdef __unix__
src/library/pc-identifiers.c
@@ -179,7 +179,7 @@
        if (use_label) {
            if (diskInfos[i].label[0] != 0) {
                memset(identifiers[j], 0, sizeof(PcIdentifier)); //!!!!!!!
                strncpy(identifiers[j], diskInfos[i].label,
                strncpy((char*)identifiers[j], diskInfos[i].label,
                        sizeof(PcIdentifier));
                j++;
            }