]> granicus.if.org Git - graphviz/commitdiff
gvconfig: squash some further -Wsign-conversion warnings
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 3 Nov 2021 04:15:54 +0000 (21:15 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 9 Nov 2021 15:10:39 +0000 (07:10 -0800)
lib/gvc/gvconfig.c

index 86a9b630f1e5e461b0f2c522fcf1fd0a223041d3..de28d600f0774a9bfb3da876e8d5f69b13990959 100644 (file)
@@ -552,7 +552,7 @@ static void config_rescan(GVC_t *gvc, char *config_path)
 void gvconfig(GVC_t * gvc, boolean rescan)
 {
 #ifdef ENABLE_LTDL
-    int sz, rc;
+    int rc;
     struct stat config_st, libdir_st;
     FILE *f = NULL;
     char *config_text = NULL;
@@ -609,7 +609,7 @@ void gvconfig(GVC_t * gvc, boolean rescan)
            }
            else {
                config_text = gmalloc((size_t)config_st.st_size + 1);
-               sz = fread(config_text, 1, config_st.st_size, f);
+               size_t sz = fread(config_text, 1, (size_t)config_st.st_size, f);
                if (sz == 0) {
                    agerr(AGERR, "%s read error.\n", gvc->config_path);
                }