mirror of
				https://github.com/sqlite/sqlite.git
				synced 2025-11-03 16:53:36 +03:00 
			
		
		
		
	Fix compiler warnings when compiling under VxWorks 7.
FossilOrigin-Name: 55c21521a64703d7050c7f8975538f4cfae95eb7
This commit is contained in:
		
							
								
								
									
										14
									
								
								src/shell.c
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								src/shell.c
									
									
									
									
									
								
							@@ -177,11 +177,19 @@ static sqlite3_int64 timeOfDay(void){
 | 
			
		||||
  return t;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#if !defined(_WIN32) && !defined(WIN32) && !defined(_WRS_KERNEL) \
 | 
			
		||||
 && !defined(__minux)
 | 
			
		||||
#if !defined(_WIN32) && !defined(WIN32) && !defined(__minux)
 | 
			
		||||
#include <sys/time.h>
 | 
			
		||||
#include <sys/resource.h>
 | 
			
		||||
 | 
			
		||||
/* VxWorks does not support getrusage() as far as we can determine */
 | 
			
		||||
#if defined(_WRS_KERNEL) || defined(__RTP__)
 | 
			
		||||
struct rusage {
 | 
			
		||||
  struct timeval ru_utime; /* user CPU time used */
 | 
			
		||||
  struct timeval ru_stime; /* system CPU time used */
 | 
			
		||||
};
 | 
			
		||||
#define getrusage(A,B) memset(B,0,sizeof(*B))
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* Saved resource information for the beginning of an operation */
 | 
			
		||||
static struct rusage sBegin;  /* CPU time at start */
 | 
			
		||||
static sqlite3_int64 iBegin;  /* Wall-clock time at start */
 | 
			
		||||
@@ -207,8 +215,8 @@ static double timeDiff(struct timeval *pStart, struct timeval *pEnd){
 | 
			
		||||
*/
 | 
			
		||||
static void endTimer(void){
 | 
			
		||||
  if( enableTimer ){
 | 
			
		||||
    struct rusage sEnd;
 | 
			
		||||
    sqlite3_int64 iEnd = timeOfDay();
 | 
			
		||||
    struct rusage sEnd;
 | 
			
		||||
    getrusage(RUSAGE_SELF, &sEnd);
 | 
			
		||||
    printf("Run Time: real %.3f user %f sys %f\n",
 | 
			
		||||
       (iEnd - iBegin)*0.001,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user