Commit cf654b44 authored by Luis Penaranda's avatar Luis Penaranda

removed some gcc warnings

parent 2d6af942
......@@ -136,7 +136,10 @@ void OpenGLCanvas::initializeGL(){
glHint(GL_PERSPECTIVE_CORRECTION_HINT,GL_NICEST);
char *input_image=(char*)malloc(512*sizeof(char*));
GET_WORKDIR(input_image,512);
if(!GET_WORKDIR(input_image,512)){
fprintf(stderr,"too long pathname\n");
exit(-1);
};
strcat(input_image,"/\0");
strcat(input_image,INPUT_IMAGE_FILE);
#ifdef __APPLE__
......@@ -497,13 +500,19 @@ void OpenGLCanvas::setShaders() {
GLuint f = glCreateShader(GL_FRAGMENT_SHADER);
char *vs_file=(char*)malloc(512*sizeof(char*));
GET_WORKDIR(vs_file,512);
if(!GET_WORKDIR(vs_file,512)){
fprintf(stderr,"too long pathname\n");
exit(-1);
};
strcat(vs_file,"/\0");
strcat(vs_file,VERT_SHADER_FILE);
fprintf(stderr,"vs_file=%s\n",vs_file);
char *fs_file=(char*)malloc(512*sizeof(char*));
GET_WORKDIR(fs_file,512);
if(!GET_WORKDIR(fs_file,512)){
fprintf(stderr,"too long pathname\n");
exit(-1);
};
strcat(fs_file,"/\0");
strcat(fs_file,FRAG_SHADER_FILE);
fprintf(stderr,"fs_file=%s\n",fs_file);
......@@ -558,7 +567,7 @@ void OpenGLCanvas::paintGL(){
// defining transformation parameters (that will be passed to the vertex shader)
float extent = calculate_extent(fov_rads);
float vis_mode;
float vis_mode=.0;
if (visualization=="Perspective") vis_mode=1.0;
else if (visualization=="3D Sphere") vis_mode=2.0;
else if (visualization=="Equi-Rectangular") vis_mode=3.0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment