Fixed gcc warnings
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
#include <sys/mman.h>
|
||||
#include <inttypes.h>
|
||||
#include <math.h>
|
||||
|
||||
//#include <ctype.h>
|
||||
|
||||
#include "obiview.h"
|
||||
#include "obidms.h"
|
||||
@ -633,7 +633,6 @@ static int enlarge_view_file(Obiview_p view, size_t new_size)
|
||||
multiple = ceil((double) new_size / (double) getpagesize());
|
||||
rounded_new_size = multiple * getpagesize();
|
||||
|
||||
|
||||
// Enlarge the file
|
||||
if (ftruncate(obiview_file_descriptor, rounded_new_size) < 0)
|
||||
{
|
||||
@ -877,7 +876,6 @@ static OBIDMS_column_p clone_column_in_view(Obiview_p view, const char* column_n
|
||||
OBIDMS_column_p column = NULL;
|
||||
OBIDMS_column_p new_column = NULL;
|
||||
OBIDMS_column_p column_buffer;
|
||||
bool found;
|
||||
|
||||
// Check that the view is not read-only
|
||||
if (view->read_only)
|
||||
@ -887,7 +885,6 @@ static OBIDMS_column_p clone_column_in_view(Obiview_p view, const char* column_n
|
||||
return NULL;
|
||||
}
|
||||
|
||||
found = false;
|
||||
for (i=0; i<((view->infos)->column_count); i++)
|
||||
{
|
||||
if ((view->line_selection != NULL) || (!strcmp((((view->infos)->column_references)[i]).alias, column_name)))
|
||||
@ -2214,7 +2211,7 @@ Obiview_p obi_open_view(OBIDMS_p dms, const char* view_name)
|
||||
|
||||
// TODO return a pointer on the column?
|
||||
int obi_view_add_column(Obiview_p view,
|
||||
const char* column_name,
|
||||
char* column_name,
|
||||
obiversion_t version_number,
|
||||
const char* alias,
|
||||
OBIType_t data_type,
|
||||
@ -2234,6 +2231,8 @@ int obi_view_add_column(Obiview_p view,
|
||||
OBIDMS_column_p column;
|
||||
OBIDMS_column_p column_buffer;
|
||||
|
||||
//for ( ; *column_name; ++column_name) *column_name = tolower(*column_name);
|
||||
|
||||
// Check that the view is not read-only
|
||||
if (view->read_only)
|
||||
{
|
||||
@ -2603,11 +2602,8 @@ int obi_dms_has_unfinished_views(OBIDMS_p dms)
|
||||
Obiview_infos_p view_infos;
|
||||
char* view_name;
|
||||
int ret_value;
|
||||
char* to_delete[1000];
|
||||
int d;
|
||||
|
||||
ret_value = 0;
|
||||
d = 0;
|
||||
|
||||
// Look for unfinished views and delete them
|
||||
rewinddir(dms->view_directory);
|
||||
@ -2743,7 +2739,7 @@ int obi_clean_unfinished_views(OBIDMS_p dms)
|
||||
free(to_delete[i]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ret_value;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user