compiler issues, warnings, makefile spiffs
authorGood Guy <good1.2guy@gmail.com>
Mon, 20 Jun 2016 16:30:02 +0000 (10:30 -0600)
committerGood Guy <good1.2guy@gmail.com>
Mon, 20 Jun 2016 16:30:02 +0000 (10:30 -0600)
16 files changed:
cinelerra-5.1/PKGBUILD
cinelerra-5.1/cinelerra/Makefile
cinelerra-5.1/cinelerra/attachmentpoint.C
cinelerra-5.1/cinelerra/garbage.C
cinelerra-5.1/cinelerra/libmjpeg.C
cinelerra-5.1/cinelerra/tracks.C
cinelerra-5.1/cinelerra/vattachmentpoint.C
cinelerra-5.1/cinelerra/virtualanode.C
cinelerra-5.1/cinelerra/virtualnode.C
cinelerra-5.1/guicast/Makefile
cinelerra-5.1/libzmpeg3/audio/layer2.C
cinelerra-5.1/libzmpeg3/libzmpeg3.h
cinelerra-5.1/plugin_config
cinelerra-5.1/plugins/C41/c41.C
cinelerra-5.1/plugins/chromakeyhsv/Makefile
cinelerra-5.1/plugins/freeverb/Components/denormals.h

index 5f01f86cab0d71040d219fadb0d3e4b6f5a4d2be..adaa80472b8ecf803bfb5f274c446b1d914f247c 100644 (file)
@@ -24,8 +24,8 @@ build() {
   ./autogen.sh
   ./configure --prefix=/usr --with-exec-name=$pkgname
 CFG_VARS="\
-CFLAGS='-Wno-narrowing -O2 -ggdb -fno-omit-frame-pointer' \
-CXXFLAGS='-Wno-narrowing -O2 -ggdb -fno-omit-frame-pointer' \
+CFLAGS='-Wno-narrowing -O2 -g -fno-omit-frame-pointer' \
+CXXFLAGS='-Wno-narrowing -O2 -g -fno-omit-frame-pointer' \
 WERROR_CFLAGS='-fpermissive'" \
   make 2>&1 | tee log
 }
index 8abbcdc36ac97d9cda85ba85e79e5c425c6dae31..51820d706180dffd4a46edd7a95e18e3e2beee91 100644 (file)
@@ -441,7 +441,7 @@ $(OBJDIR)/sha1.o:   sha1.C sha1.h
        $(CXX) `cat $(OBJDIR)/c_flags` -O3 -c $< -o $@
 
 $(DCRAW): dcraw.c
-       $(GCC) `cat $(OBJDIR)/c_flags` dcraw.c -c -o $*.o
+       $(GCC) `cat $(OBJDIR)/c_flags` -Wno-misleading-indentation dcraw.c -c -o $*.o
 
 $(THEME_DATA):
        cd $(OBJDIR) && \
index 65341f545ded4f9e48964f1e8572a609a69a69f0..1d2946132d87df9ae6aebcc8d090c849a331452e 100644 (file)
@@ -62,7 +62,7 @@ int AttachmentPoint::reset_parameters()
 
 void AttachmentPoint::reset_status()
 {
-       if(!this) printf("AttachmentPoint::reset_status NULL\n");
+       if(!(void *)this) printf("AttachmentPoint::reset_status NULL\n");
        start_position = 0;
        len = 0;
        sample_rate = 0;
@@ -79,7 +79,7 @@ int AttachmentPoint::identical(AttachmentPoint *old)
 
 int AttachmentPoint::render_init()
 {
-       if(!this) printf("AttachmentPoint::render_init NULL\n");
+       if(!(void *)this) printf("AttachmentPoint::render_init NULL\n");
        if(plugin_server && plugin->on)
        {
 // Start new plugin servers if the number of nodes changed.
@@ -155,7 +155,7 @@ void AttachmentPoint::render_stop()
 
 int AttachmentPoint::attach_virtual_plugin(VirtualNode *virtual_plugin)
 {
-       if(!this) printf("AttachmentPoint::attach_virtual_plugin NULL\n");
+       if(!(void *)this) printf("AttachmentPoint::attach_virtual_plugin NULL\n");
        int buffer_number = 0;
 
        if(plugin_server && plugin->on)
@@ -183,7 +183,7 @@ int AttachmentPoint::attach_virtual_plugin(VirtualNode *virtual_plugin)
 
 int AttachmentPoint::multichannel_shared(int search_new)
 {
-       if(!this) printf("AttachmentPoint::multichannel_shared NULL\n");
+       if(!(void *)this) printf("AttachmentPoint::multichannel_shared NULL\n");
        if(search_new)
        {
                if(new_virtual_plugins.total &&
@@ -201,7 +201,7 @@ int AttachmentPoint::multichannel_shared(int search_new)
 
 int AttachmentPoint::singlechannel()
 {
-       if(!this) printf("AttachmentPoint::singlechannel NULL\n");
+       if(!(void *)this) printf("AttachmentPoint::singlechannel NULL\n");
        if(plugin_server && !plugin_server->multichannel) return 1;
        return 0;
 }
@@ -210,7 +210,7 @@ int AttachmentPoint::singlechannel()
 void AttachmentPoint::render_gui(void *data, PluginServer *server)
 {
 //printf("AttachmentPoint::render_gui 1 %p %p\n", server, plugin_servers.get(0));
-       if(!this) printf("AttachmentPoint::render_gui 1 NULL\n");
+       if(!(void *)this) printf("AttachmentPoint::render_gui 1 NULL\n");
 
 // Discard if not 1st plugin server, so single channel plugins don't get double GUI updates
        if(server != plugin_servers.get(0)) return;
@@ -221,7 +221,7 @@ void AttachmentPoint::render_gui(void *data, PluginServer *server)
 
 void AttachmentPoint::render_gui(void *data, int size, PluginServer *server)
 {
-       if(!this) printf("AttachmentPoint::render_gui 2 NULL\n");
+       if(!(void *)this) printf("AttachmentPoint::render_gui 2 NULL\n");
 
 // Discard if not 1st plugin server, so single channel plugins don't get double GUI updates
        if(server != plugin_servers.get(0)) return;
@@ -239,7 +239,7 @@ int AttachmentPoint::gui_open()
 
 int AttachmentPoint::dump(FILE *fp)
 {
-       if(this)
+       if((void *)this)
        {
                fprintf(fp,"    Attachmentpoint this=%p virtual_plugins=%d\n", this, new_virtual_plugins.total);
                if(plugin_server) plugin_server->dump(fp);
index 654473592c31dd302a6a41f80173d6eea149e7fe..8b15d8b68cb148933119b32e8d5b040a56f42a86 100644 (file)
@@ -58,7 +58,7 @@ void Garbage::add_user()
 
 int Garbage::remove_user()
 {
-       if(!this) return 0;
+       if(!(void *)this) return 0;
 
 //printf("Garbage::remove_user %d lock=%p users=%d\n", __LINE__, lock, users);
        if(users <= 0) {
index 14937dfbc7ff686159a2aabaacfb4a1037be4fce..7cf2159ca1d69a4c6dce666b6f834d9ab73adb91 100644 (file)
@@ -771,13 +771,12 @@ printf("decompress_field %d\n", __LINE__);
        jpeg_start_decompress(&engine->jpeg_decompress);
 
 // Generate colormodel from jpeg sampling
-       if(engine->jpeg_decompress.comp_info[0].v_samp_factor == 2 &&
-               engine->jpeg_decompress.comp_info[0].h_samp_factor == 2)
-       mjpeg->jpeg_color_model = BC_YUV420P;
-    else
-       if(engine->jpeg_decompress.comp_info[0].v_samp_factor == 1 &&
-               engine->jpeg_decompress.comp_info[0].h_samp_factor == 2)
-       mjpeg->jpeg_color_model = BC_YUV422P;
+       if( engine->jpeg_decompress.comp_info[0].v_samp_factor == 2 &&
+           engine->jpeg_decompress.comp_info[0].h_samp_factor == 2)
+               mjpeg->jpeg_color_model = BC_YUV420P;
+       else if(engine->jpeg_decompress.comp_info[0].v_samp_factor == 1 &&
+           engine->jpeg_decompress.comp_info[0].h_samp_factor == 2)
+               mjpeg->jpeg_color_model = BC_YUV422P;
        else
                mjpeg->jpeg_color_model = BC_YUV444P;
 
index 9d994f471855e14b53bfe163ead38b21916f20db..e2abde91f9cf6b94362bb28ba28c0dd389f73e27 100644 (file)
@@ -402,23 +402,20 @@ int Tracks::detach_shared_effects(int module)
 int Tracks::total_of(int type)
 {
        int result = 0;
-       IntAuto *mute_keyframe = 0;
 
        for(Track *current = first; current; current = NEXT)
        {
                long unit_start = current->to_units(edl->local_session->get_selectionstart(1), 0);
-               mute_keyframe =
-                       (IntAuto*)current->automation->autos[AUTOMATION_MUTE]->get_prev_auto(
-                       unit_start,
-                       PLAY_FORWARD,
-                       (Auto* &)mute_keyframe);
+               Auto *mute_keyframe = current->automation->autos[AUTOMATION_MUTE]->
+                       get_prev_auto(unit_start, PLAY_FORWARD, mute_keyframe);
+               IntAuto *mute_auto = (IntAuto *)mute_keyframe;
 
                result +=
                        (current->play && type == PLAY) ||
                        (current->record && type == RECORD) ||
                        (current->gang && type == GANG) ||
                        (current->draw && type == DRAW) ||
-                       (mute_keyframe->value && type == MUTE) ||
+                       (mute_auto->value && type == MUTE) ||
                        (current->expand_view && type == EXPAND);
        }
        return result;
index 062db5bb826567ff27ff2d9f1782c8253a1529f6..ce787f83a65ddc725f1d59328e347c023ed5e4c5 100644 (file)
@@ -46,7 +46,7 @@ VAttachmentPoint::~VAttachmentPoint()
 
 void VAttachmentPoint::delete_buffer_vector()
 {
-       if(!this) printf("VAttachmentPoint::delete_buffer_vector NULL\n");
+       if(!(void *)this) printf("VAttachmentPoint::delete_buffer_vector NULL\n");
        if(buffer_vector)
        {
                for(int i = 0; i < virtual_plugins.total; i++)
@@ -58,7 +58,7 @@ void VAttachmentPoint::delete_buffer_vector()
 
 void VAttachmentPoint::new_buffer_vector(int width, int height, int colormodel)
 {
-       if(!this) printf("VAttachmentPoint::new_buffer_vector NULL\n");
+       if(!(void *)this) printf("VAttachmentPoint::new_buffer_vector NULL\n");
        if(buffer_vector &&
                (width != buffer_vector[0]->get_w() ||
                height != buffer_vector[0]->get_h() ||
@@ -94,7 +94,7 @@ void VAttachmentPoint::render(VFrame *output,
        int debug_render,
        int use_opengl)
 {
-       if(!this) printf("VAttachmentPoint::render NULL\n");
+       if(!(void *)this) printf("VAttachmentPoint::render NULL\n");
        if(!plugin_server || !plugin->on) return;
 
        if(debug_render)
index f922c7f774eb46525809e9dda890c7aab0b2b089..62cb5965e88f692768888fc9917f72489023a3db 100644 (file)
@@ -515,53 +515,50 @@ void VirtualANode::get_pan_automation(double &slope,
        intercept = 0;
        slope = 0;
 
-       PanAuto *prev_keyframe = 0;
-       PanAuto *next_keyframe = 0;
-       prev_keyframe = (PanAuto*)autos->get_prev_auto(input_position,
-               direction,
-               (Auto* &)prev_keyframe);
-       next_keyframe = (PanAuto*)autos->get_next_auto(input_position,
-               direction,
-               (Auto* &)next_keyframe);
+       Auto *prev_keyframe = 0, *next_keyframe = 0;
+       prev_keyframe = autos->get_prev_auto(input_position, direction, prev_keyframe);
+       next_keyframe = autos->get_next_auto(input_position, direction, next_keyframe);
+       PanAuto *prev_pan_auto = (PanAuto *)prev_keyframe;
+       PanAuto *next_pan_auto = (PanAuto *)next_keyframe;
 
        if(direction == PLAY_FORWARD)
        {
 // Two distinct automation points within range
-               if(next_keyframe->position > prev_keyframe->position)
+               if(next_pan_auto->position > prev_pan_auto->position)
                {
-                       slope = ((double)next_keyframe->values[channel] - prev_keyframe->values[channel]) /
-                               ((double)next_keyframe->position - prev_keyframe->position);
-                       intercept = ((double)input_position - prev_keyframe->position) * slope +
-                               prev_keyframe->values[channel];
+                       slope = ((double)next_pan_auto->values[channel] - prev_pan_auto->values[channel]) /
+                               ((double)next_pan_auto->position - prev_pan_auto->position);
+                       intercept = ((double)input_position - prev_pan_auto->position) * slope +
+                               prev_pan_auto->values[channel];
 
-                       if(next_keyframe->position < input_position + slope_len)
-                               slope_len = next_keyframe->position - input_position;
+                       if(next_pan_auto->position < input_position + slope_len)
+                               slope_len = next_pan_auto->position - input_position;
                }
                else
 // One automation point within range
                {
                        slope = 0;
-                       intercept = prev_keyframe->values[channel];
+                       intercept = prev_pan_auto->values[channel];
                }
        }
        else
        {
 // Two distinct automation points within range
-               if(next_keyframe->position < prev_keyframe->position)
+               if(next_pan_auto->position < prev_pan_auto->position)
                {
-                       slope = ((double)next_keyframe->values[channel] - prev_keyframe->values[channel]) /
-                               ((double)next_keyframe->position - prev_keyframe->position);
-                       intercept = ((double)input_position - prev_keyframe->position) * slope +
-                               prev_keyframe->values[channel];
+                       slope = ((double)next_pan_auto->values[channel] - prev_pan_auto->values[channel]) /
+                               ((double)next_pan_auto->position - prev_pan_auto->position);
+                       intercept = ((double)input_position - prev_pan_auto->position) * slope +
+                               prev_pan_auto->values[channel];
 
-                       if(next_keyframe->position > input_position - slope_len)
-                               slope_len = input_position - next_keyframe->position;
+                       if(next_pan_auto->position > input_position - slope_len)
+                               slope_len = input_position - next_pan_auto->position;
                }
                else
 // One automation point within range
                {
                        slope = 0;
-                       intercept = next_keyframe->values[channel];
+                       intercept = next_pan_auto->values[channel];
                }
        }
 }
index c441431bc84ad93d70ac1b30a79f265fa3fb2cd4..f773d3eec24bf7a78259f1da0bda17a7d98e3af3 100644 (file)
@@ -381,45 +381,45 @@ void VirtualNode::get_mute_fragment(int64_t input_position,
 {
        if(use_nudge) input_position += track->nudge;
 
-       IntAuto *prev_keyframe = 0;
-       IntAuto *next_keyframe = 0;
-       prev_keyframe = (IntAuto*)autos->get_prev_auto(input_position,
-               direction,
-               (Auto* &)prev_keyframe);
-       next_keyframe = (IntAuto*)autos->get_next_auto(input_position,
-               direction,
-               (Auto* &)next_keyframe);
+       Auto *prev_keyframe = 0;
+       Auto *next_keyframe = 0;
+       prev_keyframe = autos->get_prev_auto(input_position,
+               direction, prev_keyframe);
+       next_keyframe = autos->get_next_auto(input_position,
+               direction, next_keyframe);
+       IntAuto *prev_int_auto = (IntAuto *)prev_keyframe;
+       IntAuto *next_int_auto = (IntAuto *)next_keyframe;
 
        if(direction == PLAY_FORWARD)
        {
 // Two distinct keyframes within range
-               if(next_keyframe->position > prev_keyframe->position)
+               if(next_int_auto->position > prev_int_auto->position)
                {
-                       mute_constant = prev_keyframe->value;
+                       mute_constant = prev_int_auto->value;
 
-                       if(next_keyframe->position < input_position + fragment_len)
-                               fragment_len = next_keyframe->position - input_position;
+                       if(next_int_auto->position < input_position + fragment_len)
+                               fragment_len = next_int_auto->position - input_position;
                }
                else
 // One keyframe within range
                {
-                       mute_constant = prev_keyframe->value;
+                       mute_constant = prev_int_auto->value;
                }
        }
        else
        {
 // Two distinct keyframes within range
-               if(next_keyframe->position < prev_keyframe->position)
+               if(next_int_auto->position < prev_int_auto->position)
                {
-                       mute_constant = next_keyframe->value;
+                       mute_constant = next_int_auto->value;
 
-                       if(next_keyframe->position > input_position - fragment_len)
-                               fragment_len = input_position - next_keyframe->position;
+                       if(next_int_auto->position > input_position - fragment_len)
+                               fragment_len = input_position - next_int_auto->position;
                }
                else
 // One keyframe within range
                {
-                       mute_constant = next_keyframe->value;
+                       mute_constant = next_int_auto->value;
                }
        }
 }
index 4bcda763ab0139932f9c2fcc0b33d74dceddb947..613aba1db41ef00f333a7d9683782e60da7f1b11 100644 (file)
@@ -94,7 +94,7 @@ $(OBJDIR)/bcxfer.o:   bcxfer.C xfer.C xfer.h
        $(CXX) `cat $(OBJDIR)/c_flags` -O3 -c $< -o $@
 
 bcxfer.C:      bccmdl.py
-       python < ./bccmdl.py > bcxfer.C
+       python2.7 < ./bccmdl.py > bcxfer.C
 
 $(OUTPUT): $(OBJS)
        ar rcs $(OUTPUT) `cat $(OBJDIR)/objs`
index eef58669771db8269efacc74e3be675cb0676e13..120034a13dd18b9ecde3c2b8289efb0a30ee0e1f 100644 (file)
@@ -221,11 +221,10 @@ step_one(uint8_t *bit_alloc, int *scale)
     /* mono */
     for( i=sblimit; --i>=0 ; alloc1+=(1<<step) )
       *bita++ = (char)stream->get_bits(step = alloc1->bits);
-      bita = bit_alloc;
-      scfsi = scfsi_buf;
-      for( i=sblimit; --i>=0 ; )
-        if( *bita++ )
-          *scfsi++ = (char)stream->get_bits(2);
+    bita = bit_alloc;
+    scfsi = scfsi_buf;
+    for( i=sblimit; --i>=0 ; )
+      if( *bita++ ) *scfsi++ = (char)stream->get_bits(2);
   }
 
   bita = bit_alloc;
index e12321850a2cd1d2490ba8b7c71fcf219d3e88b9..6fc2c6c712ff98cc14015466c7d79f897b6d0afa 100644 (file)
@@ -94,7 +94,7 @@ extern "C" {
 
 #define new_memset(s) \
   void *operator new(size_t n) { \
-    void *t = (void*) new char[n]; \
+    void * volatile t = (void*) new char[n]; \
     memset(t,s,n); \
     return t; \
   } \
@@ -102,7 +102,7 @@ extern "C" {
     delete[](char*)t; \
   } \
   void *operator new[](size_t n) { \
-    void *t = (void*) new char[n]; \
+    void * volatile t = (void*) new char[n]; \
     memset(t,s,n); \
     return t; \
   } \
index 77cb4c3fc7f3b1508ff0aa6e66885101470043be..41afda3c696c61005ab026cf5041c34b82bb2d80 100644 (file)
@@ -18,8 +18,8 @@ $(shell echo $(LFLAGS) > $(OBJDIR)/l_flags)
 
 ifeq ($(OUTPUT_THEME),)
 
-$(OUTPUT): $(OBJS) $(OUTPUT_DIR) $(OUTPUT_PNGS)
-       $(LDLINKER) -o $(OUTPUT) $(OBJS) `cat $(OBJDIR)/l_flags`
+$(OUTPUT): $(OBJS) $(OUTPUT_DIR) $(OUTPUT_PNGS) $(OUTPUT_BINS)
+       $(LDLINKER) -o $(OUTPUT) $(OBJS) $(OUTPUT_BINS) `cat $(OBJDIR)/l_flags`
        $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(OUTPUT) $(OUTPUT_G))
        $(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT))
 
index ee59aec5eacd8df62793555083ad0cf525c2e0a1..c2d59da47ef6a9a2b3ad221df24cf22b6cf85d9f 100644 (file)
@@ -460,7 +460,8 @@ float C41Effect::myLog2(float i)
        float x;
        float y;
        float LogBodge = 0.346607f;
-       x = *(int *)&i;
+       union { float f; int i; } v;
+       v.f = i;  x = v.i;
        x *= 1.0 / (1 << 23); // 1/pow(2,23);
        x = x - 127;
 
@@ -478,7 +479,8 @@ float C41Effect::myPow2(float i)
 
        x = i + 127 - y;
        x *= (1 << 23);
-       *(int*) &x = (int)x;
+       union { float f; int i; } v;
+       v.i = (int)x;  x = v.f;
        return x;
 }
 
index 5b9fb3ceed99fb8ec707f4f80a56dd67e184d2f8..d1a40d36a363d0acd368d683224b3c0324255793 100644 (file)
@@ -1,13 +1,13 @@
 include ../../plugin_defs
 
 PLUGIN = chromakeyhsv
-SHADER := $(OBJDIR)/chromakey_sl.o
+OUTPUT_BINS := $(OBJDIR)/chromakey_sl.o
 OBJS := $(OBJDIR)/chromakey.o $(SHADER)
 
 include ../../plugin_config
 
 $(OBJDIR)/chromakey.o: chromakey.C
-$(SHADER): chromakey.sl
+$(OUTPUT_BINS): chromakey.sl
        cd $(OBJDIR) && \
        ../../../guicast/$(OBJDIR)/bootstrap -s chromakey_sl.o ../chromakey.sl
 
index bb100d31c6a9fc6720c94b3029c9b304006cde54..a6d599a665c0e3bc8dd665322144e389dd2f9973 100644 (file)
@@ -1,19 +1,27 @@
-// Macro for killing denormalled numbers\r
-//\r
-// Written by Jezar at Dreampoint, June 2000\r
-// http://www.dreampoint.co.uk\r
-// Based on IS_DENORMAL macro by Jon Watte\r
-// This code is public domain\r
-\r
-#ifndef _denormals_\r
-#define _denormals_\r
-\r
-#define undenormalise(sample) if(((*(unsigned int*)&sample)&0x7f800000)==0) sample=0.0f\r
-\r
-#endif//_denormals_\r
-\r
-//ends\r
-\r
-\r
-\r
-\r
+// Macro for killing denormalled numbers
+//
+// Written by Jezar at Dreampoint, June 2000
+// http://www.dreampoint.co.uk
+// Based on IS_DENORMAL macro by Jon Watte
+// This code is public domain
+
+#ifndef _denormals_
+#define _denormals_
+
+/*
+#define undenormalise(sample) \
+ if(((*(unsigned int*)&sample)&0x7f800000)==0) sample=0.0f
+*/
+
+static inline void undenormalise(float &sample) {
+  union { float f; unsigned int u; } v;  v.f = sample;
+  if( !(v.u & 0x7f800000) ) sample=0.f;
+}
+#endif//_denormals_
+
+//ends
+
+
+
+