Fix compilation errors and warnings with Clang-6
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 28 Sep 2018 07:46:12 +0000 (09:46 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 28 Sep 2018 07:46:12 +0000 (09:46 +0200)
intern/cycles/render/camera.cpp
source/blender/editors/space_logic/logic_window.c
source/blender/windowmanager/intern/wm_files.c

index ec3c56e820add5ccae4c968e9b2cec4b96ac586d..34066e1b024887e9805a2ef3b549ec57f8ac1d87 100644 (file)
@@ -716,7 +716,7 @@ float Camera::world_to_raster_size(float3 P)
                float3 D = transform_point(&worldtocamera, P);
                float dist = len(D);
 
-               Ray ray = {0};
+               Ray ray = {{0}};
 
                /* Distortion can become so great that the results become meaningless, there
                 * may be a better way to do this, but calculating differentials from the
index c8385dfcbe3d95704d4de7af7448527a576c6613..a88d82fa05adb11840105b57ca5864aa8760f11b 100644 (file)
@@ -964,7 +964,7 @@ static void draw_sensor_collision(uiLayout *layout, PointerRNA *ptr, bContext *C
        uiItemR(row, ptr, "use_pulse", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
        uiItemR(row, ptr, "use_material", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
 
-       switch (RNA_boolean_get(ptr, "use_material")) {
+       switch (RNA_enum_get(ptr, "use_material")) {
                case SENS_COLLISION_PROPERTY:
                        uiItemR(split, ptr, "property", 0, NULL, ICON_NONE);
                        break;
index 38e2d6d21ee38b13b9f4a091b4f520c38c39f82d..796103677bf1aaf016083fc83077a1e97c437d88 100644 (file)
@@ -641,7 +641,7 @@ bool WM_file_read(bContext *C, const char *filepath, ReportList *reports)
 struct {
        char app_template[64];
        bool override;
-} wm_init_state_app_template = {0};
+} wm_init_state_app_template = {{0}};
 
 /**
  * Used for setting app-template from the command line: