Mercurial > audlegacy
comparison src/audlegacy/pluginenum.c @ 4855:bc6212d7fab1
Remove no longer relevant code.
Found by LLVM static analyzer.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Thu, 16 Apr 2009 19:57:44 -0500 |
parents | e413f6dffd21 |
children | f1fc1d973f27 |
comparison
equal
deleted
inserted
replaced
4854:23cc350969e6 | 4855:bc6212d7fab1 |
---|---|
1030 /* FIXME: race condition -nenolod */ | 1030 /* FIXME: race condition -nenolod */ |
1031 op_data.current_output_plugin = NULL; | 1031 op_data.current_output_plugin = NULL; |
1032 | 1032 |
1033 for (node = get_input_list(); node; node = g_list_next(node)) { | 1033 for (node = get_input_list(); node; node = g_list_next(node)) { |
1034 ip = INPUT_PLUGIN(node->data); | 1034 ip = INPUT_PLUGIN(node->data); |
1035 if (ip && ip->cleanup) { | 1035 if (ip) { |
1036 plugin_set_current((Plugin *)ip); | 1036 plugin_set_current((Plugin *)ip); |
1037 ip->cleanup(); | 1037 |
1038 if (ip->cleanup) | |
1039 ip->cleanup(); | |
1040 | |
1038 GDK_THREADS_LEAVE(); | 1041 GDK_THREADS_LEAVE(); |
1039 while (g_main_context_iteration(NULL, FALSE)); | 1042 while (g_main_context_iteration(NULL, FALSE)); |
1040 GDK_THREADS_ENTER(); | 1043 GDK_THREADS_ENTER(); |
1041 } | 1044 } |
1042 | |
1043 if (ip->handle) | |
1044 g_module_close(ip->handle); | |
1045 } | 1045 } |
1046 | 1046 |
1047 if (ip_data.input_list != NULL) | 1047 if (ip_data.input_list != NULL) |
1048 { | 1048 { |
1049 g_list_free(ip_data.input_list); | 1049 g_list_free(ip_data.input_list); |
1050 ip_data.input_list = NULL; | 1050 ip_data.input_list = NULL; |
1051 } | 1051 } |
1052 | 1052 |
1053 for (node = get_output_list(); node; node = g_list_next(node)) { | 1053 for (node = get_output_list(); node; node = g_list_next(node)) { |
1054 op = OUTPUT_PLUGIN(node->data); | 1054 op = OUTPUT_PLUGIN(node->data); |
1055 if (op && op->cleanup) { | 1055 if (op) { |
1056 plugin_set_current((Plugin *)op); | 1056 plugin_set_current((Plugin *)op); |
1057 op->cleanup(); | 1057 |
1058 if (op->cleanup) | |
1059 op->cleanup(); | |
1060 | |
1058 GDK_THREADS_LEAVE(); | 1061 GDK_THREADS_LEAVE(); |
1059 while (g_main_context_iteration(NULL, FALSE)); | 1062 while (g_main_context_iteration(NULL, FALSE)); |
1060 GDK_THREADS_ENTER(); | 1063 GDK_THREADS_ENTER(); |
1061 } | 1064 } |
1062 | |
1063 if (op->handle) | |
1064 g_module_close(op->handle); | |
1065 } | 1065 } |
1066 | 1066 |
1067 if (op_data.output_list != NULL) | 1067 if (op_data.output_list != NULL) |
1068 { | 1068 { |
1069 g_list_free(op_data.output_list); | 1069 g_list_free(op_data.output_list); |
1070 op_data.output_list = NULL; | 1070 op_data.output_list = NULL; |
1071 } | 1071 } |
1072 | 1072 |
1073 for (node = get_effect_list(); node; node = g_list_next(node)) { | 1073 for (node = get_effect_list(); node; node = g_list_next(node)) { |
1074 ep = EFFECT_PLUGIN(node->data); | 1074 ep = EFFECT_PLUGIN(node->data); |
1075 if (ep && ep->cleanup) { | 1075 if (ep) { |
1076 plugin_set_current((Plugin *)ep); | 1076 plugin_set_current((Plugin *)ep); |
1077 ep->cleanup(); | 1077 |
1078 if (ep->cleanup) | |
1079 ep->cleanup(); | |
1080 | |
1078 GDK_THREADS_LEAVE(); | 1081 GDK_THREADS_LEAVE(); |
1079 while (g_main_context_iteration(NULL, FALSE)); | 1082 while (g_main_context_iteration(NULL, FALSE)); |
1080 GDK_THREADS_ENTER(); | 1083 GDK_THREADS_ENTER(); |
1081 } | 1084 } |
1082 | |
1083 if (ep->handle) | |
1084 g_module_close(ep->handle); | |
1085 } | 1085 } |
1086 | 1086 |
1087 if (ep_data.effect_list != NULL) | 1087 if (ep_data.effect_list != NULL) |
1088 { | 1088 { |
1089 g_list_free(ep_data.effect_list); | 1089 g_list_free(ep_data.effect_list); |
1090 ep_data.effect_list = NULL; | 1090 ep_data.effect_list = NULL; |
1091 } | 1091 } |
1092 | 1092 |
1093 for (node = get_general_list(); node; node = g_list_next(node)) { | 1093 for (node = get_general_list(); node; node = g_list_next(node)) { |
1094 gp = GENERAL_PLUGIN(node->data); | 1094 gp = GENERAL_PLUGIN(node->data); |
1095 if (gp && gp->cleanup) { | 1095 if (gp) { |
1096 plugin_set_current((Plugin *)gp); | 1096 plugin_set_current((Plugin *)gp); |
1097 gp->cleanup(); | 1097 |
1098 if (gp->cleanup) | |
1099 gp->cleanup(); | |
1100 | |
1098 GDK_THREADS_LEAVE(); | 1101 GDK_THREADS_LEAVE(); |
1099 while (g_main_context_iteration(NULL, FALSE)); | 1102 while (g_main_context_iteration(NULL, FALSE)); |
1100 GDK_THREADS_ENTER(); | 1103 GDK_THREADS_ENTER(); |
1101 } | 1104 } |
1102 | |
1103 if (gp->handle) | |
1104 g_module_close(gp->handle); | |
1105 } | 1105 } |
1106 | 1106 |
1107 if (gp_data.general_list != NULL) | 1107 if (gp_data.general_list != NULL) |
1108 { | 1108 { |
1109 g_list_free(gp_data.general_list); | 1109 g_list_free(gp_data.general_list); |
1110 gp_data.general_list = NULL; | 1110 gp_data.general_list = NULL; |
1111 } | 1111 } |
1112 | 1112 |
1113 for (node = get_vis_list(); node; node = g_list_next(node)) { | 1113 for (node = get_vis_list(); node; node = g_list_next(node)) { |
1114 vp = VIS_PLUGIN(node->data); | 1114 vp = VIS_PLUGIN(node->data); |
1115 if (vp && vp->cleanup) { | 1115 if (vp) { |
1116 plugin_set_current((Plugin *)vp); | 1116 plugin_set_current((Plugin *)vp); |
1117 vp->cleanup(); | 1117 |
1118 if (vp->cleanup) | |
1119 vp->cleanup(); | |
1120 | |
1118 GDK_THREADS_LEAVE(); | 1121 GDK_THREADS_LEAVE(); |
1119 while (g_main_context_iteration(NULL, FALSE)); | 1122 while (g_main_context_iteration(NULL, FALSE)); |
1120 GDK_THREADS_ENTER(); | 1123 GDK_THREADS_ENTER(); |
1121 } | 1124 } |
1122 | |
1123 if (vp->handle) | |
1124 g_module_close(vp->handle); | |
1125 } | 1125 } |
1126 | 1126 |
1127 if (vp_data.vis_list != NULL) | 1127 if (vp_data.vis_list != NULL) |
1128 { | 1128 { |
1129 g_list_free(vp_data.vis_list); | 1129 g_list_free(vp_data.vis_list); |
1131 } | 1131 } |
1132 | 1132 |
1133 | 1133 |
1134 for (node = get_discovery_list(); node; node = g_list_next(node)) { | 1134 for (node = get_discovery_list(); node; node = g_list_next(node)) { |
1135 dp = DISCOVERY_PLUGIN(node->data); | 1135 dp = DISCOVERY_PLUGIN(node->data); |
1136 if (dp && dp->cleanup) { | 1136 if (dp) { |
1137 plugin_set_current((Plugin *)dp); | 1137 plugin_set_current((Plugin *)dp); |
1138 dp->cleanup(); | 1138 |
1139 if (dp->cleanup) | |
1140 dp->cleanup(); | |
1141 | |
1139 GDK_THREADS_LEAVE(); | 1142 GDK_THREADS_LEAVE(); |
1140 while (g_main_context_iteration(NULL, FALSE)); | 1143 while (g_main_context_iteration(NULL, FALSE)); |
1141 GDK_THREADS_ENTER(); | 1144 GDK_THREADS_ENTER(); |
1142 } | 1145 } |
1143 | |
1144 if (dp->handle) | |
1145 g_module_close(dp->handle); | |
1146 } | 1146 } |
1147 | 1147 |
1148 if (dp_data.discovery_list != NULL) | 1148 if (dp_data.discovery_list != NULL) |
1149 { | 1149 { |
1150 g_list_free(dp_data.discovery_list); | 1150 g_list_free(dp_data.discovery_list); |
1151 dp_data.discovery_list = NULL; | 1151 dp_data.discovery_list = NULL; |
1152 } | 1152 } |
1153 | 1153 |
1154 | |
1155 | |
1156 for (node = lowlevel_list; node; node = g_list_next(node)) { | 1154 for (node = lowlevel_list; node; node = g_list_next(node)) { |
1157 lp = LOWLEVEL_PLUGIN(node->data); | 1155 lp = LOWLEVEL_PLUGIN(node->data); |
1158 if (lp && lp->cleanup) { | 1156 if (lp) { |
1159 plugin_set_current((Plugin *)lp); | 1157 plugin_set_current((Plugin *)lp); |
1160 lp->cleanup(); | 1158 |
1159 if (lp->cleanup) | |
1160 lp->cleanup(); | |
1161 | |
1161 GDK_THREADS_LEAVE(); | 1162 GDK_THREADS_LEAVE(); |
1162 while (g_main_context_iteration(NULL, FALSE)); | 1163 while (g_main_context_iteration(NULL, FALSE)); |
1163 GDK_THREADS_ENTER(); | 1164 GDK_THREADS_ENTER(); |
1164 } | 1165 } |
1165 | |
1166 if (lp->handle) | |
1167 g_module_close(lp->handle); | |
1168 } | 1166 } |
1169 | 1167 |
1170 if (lowlevel_list != NULL) | 1168 if (lowlevel_list != NULL) |
1171 { | 1169 { |
1172 g_list_free(lowlevel_list); | 1170 g_list_free(lowlevel_list); |