[epiphany/mcatanzaro/cppcheck: 7/16] snapshot-service: avoid cppcheck warning
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/cppcheck: 7/16] snapshot-service: avoid cppcheck warning
- Date: Sun, 17 Nov 2019 17:05:49 +0000 (UTC)
commit d04753699e6aa15fdc8c5ded03ce7b5c7218ad6f
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sun Nov 17 10:31:23 2019 -0600
snapshot-service: avoid cppcheck warning
It doesn't like initializing a variable to a value that is never used...
except when it does?
lib/ephy-snapshot-service.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/lib/ephy-snapshot-service.c b/lib/ephy-snapshot-service.c
index 206822f22..e1e21aeca 100644
--- a/lib/ephy-snapshot-service.c
+++ b/lib/ephy-snapshot-service.c
@@ -217,7 +217,7 @@ ephy_snapshot_service_prepare_snapshot (cairo_surface_t *surface)
GdkPixbuf *snapshot, *scaled;
int orig_width, orig_height;
float orig_aspect_ratio, dest_aspect_ratio;
- int x_offset, new_width = 0, new_height;
+ int x_offset, new_width, new_height;
orig_width = cairo_image_surface_get_width (surface);
orig_height = cairo_image_surface_get_height (surface);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]