[gjs/gnome-3-24] maint: fix a wrong sscanf argument



commit 722cb036327ec9716d235c02f30478caf76f5f67
Author: Claudio André <claudioandre br gmail com>
Date:   Mon Jun 19 13:37:20 2017 -0300

    maint: fix a wrong sscanf argument
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783214

 test/gjs-test-coverage.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/test/gjs-test-coverage.cpp b/test/gjs-test-coverage.cpp
index c613644..441783e 100644
--- a/test/gjs-test-coverage.cpp
+++ b/test/gjs-test-coverage.cpp
@@ -902,7 +902,7 @@ hit_count_is_more_than_for_function(const char *line,
 
     max_buf_size = strcspn(line, "\n");
     detected_function = g_new(char, max_buf_size + 1);
-    nmatches = sscanf(line, "%i,%s", &hit_count, detected_function);
+    nmatches = sscanf(line, "%u,%s", &hit_count, detected_function);
     if (nmatches != 2) {
         if (errno != 0)
             g_error("sscanf: %s", strerror(errno));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]