Unused Value at font_utils.c:219 |
No properties have been set. edit properties |
Jump to warning location ↓ | warning details... |
| |
font_zoom (/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/font_utils.c)![]() | ||||||
![]() | ||||||
203 | static char * | |||||
204 | font_zoom(char *gui_font_name) | |||||
205 | { | |||||
206 | char *new_font_name; | |||||
207 | char *font_name_dup; | |||||
208 | char *font_name_p; | |||||
209 | long font_point_size_l; | |||||
210 | ||||||
211 | if (recent.gui_zoom_level == 0) { | |||||
212 | /* There is no zoom factor - just return the name, so that if | |||||
213 | this is GTK+ 1.2[.x] and the font name isn't an XLFD font | |||||
214 | name, we don't fail. */ | |||||
215 | return g_strdup(gui_font_name); | |||||
216 | } | |||||
217 | ||||||
218 | font_name_dup = g_strdup(gui_font_name); | |||||
219 | font_name_p = font_name_dup;
| |||||
220 | ||||||
221 | /* find the start of the font_size string */ | |||||
222 | font_name_p = strrchr(font_name_dup, ' '); | |||||
223 | *font_name_p = '\0'; | |||||
224 | font_name_p++; | |||||
225 | ||||||
226 | /* calculate the new font size */ | |||||
227 | font_point_size_l = strtol(font_name_p, NULL, 10); | |||||
228 | font_point_size_l += recent.gui_zoom_level; | |||||
229 | ||||||
230 | /* build a new font name */ | |||||
231 | new_font_name = g_strdup_printf("%s %ld", font_name_dup, font_point_size_l); | |||||
232 | ||||||
233 | g_free(font_name_dup); | |||||
234 | ||||||
235 | return new_font_name; | |||||
236 | } | |||||
![]() |