浏览代码

cnxcc: inline functions defined in other objects throw warning in llvm

- an option would be defining whole function inside the .h file
Daniel-Constantin Mierla 11 年之前
父节点
当前提交
da0fe20153
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 3 3
      modules/cnxcc/cnxcc.c
  2. 3 3
      modules/cnxcc/cnxcc.h

+ 3 - 3
modules/cnxcc/cnxcc.c

@@ -28,17 +28,17 @@
 
 #include "cnxcc.h"
 
-inline void get_datetime(str *dest)
+void get_datetime(str *dest)
 {
 	timestamp2isodt(dest, get_current_timestamp());
 }
 
-inline unsigned int get_current_timestamp()
+unsigned int get_current_timestamp()
 {
 	return time(NULL);
 }
 
-inline int timestamp2isodt(str *dest, unsigned int timestamp)
+int timestamp2isodt(str *dest, unsigned int timestamp)
 {
 	time_t  		tim;
 	struct tm 		*tmPtr;

+ 3 - 3
modules/cnxcc/cnxcc.h

@@ -31,9 +31,9 @@
 #define DATETIME_LENGTH		DATETIME_SIZE - 1
 
 
-inline void get_datetime(str *dest);
-inline unsigned int get_current_timestamp();
-inline int timestamp2isodt(str *dest, unsigned int timestamp);
+void get_datetime(str *dest);
+unsigned int get_current_timestamp();
+int timestamp2isodt(str *dest, unsigned int timestamp);
 double str2double(str *string);
 
 #endif /* _CNXCC_H */