From 0d0ac8dd5d25d0718c46fd7daca6cd703fc28347 Mon Sep 17 00:00:00 2001 From: gforney Date: Wed, 10 Jun 2026 15:08:47 -0400 Subject: [PATCH 1/3] glui source: make variable allow_glui_post_redisplay private to eliminate 'defined but not used warnings' - addresses smokeview issue 2628 --- Source/glui_v2_1_beta/glui.cpp | 16 ++++++++++++---- Source/glui_v2_1_beta/glui.h | 3 +-- Source/glui_v2_1_beta/glui_control.cpp | 6 +++--- Source/glui_v2_1_beta/glui_panel.cpp | 2 +- Source/glui_v2_1_beta/glui_rollout.cpp | 4 ++-- 5 files changed, 19 insertions(+), 12 deletions(-) diff --git a/Source/glui_v2_1_beta/glui.cpp b/Source/glui_v2_1_beta/glui.cpp index 73abf5554..9524f447a 100644 --- a/Source/glui_v2_1_beta/glui.cpp +++ b/Source/glui_v2_1_beta/glui.cpp @@ -20,6 +20,14 @@ #include "glui.h" #include "stdinc.h" +static int allow_glui_post_redisplay = 1; + +/************************************ GetGluiPostReDisplay ************/ + +int GetGluiPostReDisplay(void){ + return allow_glui_post_redisplay; +} + /************************************ GluiPostRedisplayOn ************/ void GluiPostRedisplayOn(void){ @@ -986,7 +994,7 @@ void GLUI_Main::post_update_main_gfx( void ) if ( main_gfx_window_id > 0 ) { old_window = glutGetWindow(); glutSetWindow( main_gfx_window_id ); - if(allow_glui_post_redisplay==1)glutPostRedisplay(); + if(GetGluiPostReDisplay()==1)glutPostRedisplay(); if( old_window > 0 ) glutSetWindow( old_window ); } @@ -1427,7 +1435,7 @@ void GLUI::close( void ) old_glut_window = glutGetWindow(); glutSetWindow( get_glut_window_id() ); - if(allow_glui_post_redisplay==1)glutPostRedisplay(); + if(GetGluiPostReDisplay() == 1)glutPostRedisplay(); glutSetWindow( old_glut_window ); } @@ -1864,7 +1872,7 @@ void GLUI_Main::refresh( void ) if ( glut_window_id > 0 ) glutSetWindow( glut_window_id ); - if(allow_glui_post_redisplay==1)glutPostRedisplay(); + if(GetGluiPostReDisplay() ==1)glutPostRedisplay(); /* printf( "top_level: %d\n", top_level_glut_window_id );*/ glutSetWindow( top_level_glut_window_id ); @@ -1883,7 +1891,7 @@ void GLUI_Main::refresh( void ) glutReshapeWindow( new_w, new_h ); - if(allow_glui_post_redisplay==1)glutPostRedisplay(); + if(GetGluiPostReDisplay() ==1)glutPostRedisplay(); } glutSetWindow( orig); diff --git a/Source/glui_v2_1_beta/glui.h b/Source/glui_v2_1_beta/glui.h index 35c01ce7c..b4482614d 100644 --- a/Source/glui_v2_1_beta/glui.h +++ b/Source/glui_v2_1_beta/glui.h @@ -361,8 +361,7 @@ enum GLUI_StdBitmaps_Codes { GLUI_STDBITMAP_NUM_ITEMS }; -static int allow_glui_post_redisplay=1; - +extern "C" int GetGluiPostReDisplay(void); extern "C" void GluiPostRedisplayOn(void); extern "C" void GluiPostRedisplayOff(void); diff --git a/Source/glui_v2_1_beta/glui_control.cpp b/Source/glui_v2_1_beta/glui_control.cpp index d727b487f..12a34b4ee 100644 --- a/Source/glui_v2_1_beta/glui_control.cpp +++ b/Source/glui_v2_1_beta/glui_control.cpp @@ -481,7 +481,7 @@ void GLUI_Control::set_w( int new_w ) if ( glui->get_glut_window_id() != -1 ) { int orig = set_to_glut_window(); glutReshapeWindow( glui->main_panel->w, glui->main_panel->h ); - if(allow_glui_post_redisplay==1)glutPostRedisplay(); + if(GetGluiPostReDisplay()==1)glutPostRedisplay(); /* printf( "Requesting a reshape to window %d: %d %d\n", glutGetWindow(), glui->main_panel->w, glui->main_panel->h );*/ @@ -505,7 +505,7 @@ void GLUI_Control::set_h( int new_h ) if ( glui->get_glut_window_id() != -1 ) { int orig = set_to_glut_window(); glutReshapeWindow( glui->main_panel->w, glui->main_panel->h ); - if(allow_glui_post_redisplay==1)glutPostRedisplay(); + if(GetGluiPostReDisplay()==1)glutPostRedisplay(); restore_window(orig); } } @@ -522,7 +522,7 @@ void GLUI_Control::set_alignment( int new_align ) if ( glui->get_glut_window_id() != -1 ) { int orig = set_to_glut_window(); - if(allow_glui_post_redisplay==1)glutPostRedisplay(); + if(GetGluiPostReDisplay()==1)glutPostRedisplay(); restore_window(orig); } } diff --git a/Source/glui_v2_1_beta/glui_panel.cpp b/Source/glui_v2_1_beta/glui_panel.cpp index e93c2a2f3..413a99fb2 100644 --- a/Source/glui_v2_1_beta/glui_panel.cpp +++ b/Source/glui_v2_1_beta/glui_panel.cpp @@ -149,7 +149,7 @@ void GLUI_Panel::set_type( int new_type ) update_size(); old_window = set_to_glut_window(); - if(allow_glui_post_redisplay==1)glutPostRedisplay(); + if(GetGluiPostReDisplay()==1)glutPostRedisplay(); restore_window( old_window ); } } diff --git a/Source/glui_v2_1_beta/glui_rollout.cpp b/Source/glui_v2_1_beta/glui_rollout.cpp index 2f842a5bc..6e4120c42 100644 --- a/Source/glui_v2_1_beta/glui_rollout.cpp +++ b/Source/glui_v2_1_beta/glui_rollout.cpp @@ -57,7 +57,7 @@ void GLUI_Rollout::open( void ) restore_window(orig); refresh_glui_dialogs = 1; SetMainWindow(); - if(allow_glui_post_redisplay==1)glutPostRedisplay(); + if(GetGluiPostReDisplay()==1)glutPostRedisplay(); } @@ -94,7 +94,7 @@ void GLUI_Rollout::close( void ) glui->refresh(); refresh_glui_dialogs = 1; SetMainWindow(); - if(allow_glui_post_redisplay==1)glutPostRedisplay(); + if(GetGluiPostReDisplay()==1)glutPostRedisplay(); } From 1b64d5426129d4a5458577c6f8eb4a6f5b730bed Mon Sep 17 00:00:00 2001 From: gforney Date: Wed, 10 Jun 2026 15:17:39 -0400 Subject: [PATCH 2/3] smv build: update makefile to avoid false positives --- Build/smokeview/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build/smokeview/Makefile b/Build/smokeview/Makefile index 7395ea91d..d20b1cd34 100644 --- a/Build/smokeview/Makefile +++ b/Build/smokeview/Makefile @@ -293,7 +293,7 @@ gnu_linux_db : $(obj) # ------------- gnu_linux ---------------- -gnu_linux : CFLAGS = -O0 -ggdb -Wall -Wno-parentheses -Wno-unknown-pragmas \ +gnu_linux : CFLAGS = -O0 -ggdb -Wall -Wno-parentheses -Wno-unknown-pragmas -Wno-comment -Wno-address\ -D NDEBUG $(CFLAGS_COM) gnu_linux : CC = gcc gnu_linux : CPP = g++ From e389fb58d12dbb44ccd666253075d645e122c882 Mon Sep 17 00:00:00 2001 From: gforney Date: Wed, 10 Jun 2026 22:42:38 -0400 Subject: [PATCH 3/3] smv build: remove sanitize build option --- Build/scripts/setopts.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Build/scripts/setopts.sh b/Build/scripts/setopts.sh index 3df4ff253..cd2dfa215 100755 --- a/Build/scripts/setopts.sh +++ b/Build/scripts/setopts.sh @@ -10,7 +10,6 @@ LIBSDIR=`pwd` SMV_MAKE_OPTS= TEST= -SANITIZE= if [ "`uname`" == "Darwin" ]; then GLUT= GLIBDIROPT= @@ -34,7 +33,7 @@ BUILD_LIBS= BUILD_ALL=1 GLTYPE=COCOA TESTOPT= -while getopts 'CfGhiIl:LprSX' OPTION +while getopts 'CfGhiIl:LprX' OPTION do case $OPTION in C) @@ -55,7 +54,6 @@ case $OPTION in echo "-i - incremental build" echo "-L - rebuild all libraries" echo "-p - build a profiling version of smokeview" - echo "-S - build smokeview with sanitize debug options" exit ;; i) @@ -77,9 +75,6 @@ case $OPTION in ;; r) ;; - S) - SANITIZE=1 - ;; X) GLTYPE=XQUARTZ ;; @@ -89,7 +84,6 @@ done export SMV_MAKE_OPTS export GLUT export TEST -export SANITIZE export GLTYPE # this parameter is only for the mac