]> granicus.if.org Git - graphviz/commitdiff
remove yet another -Wconversion warning
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 9 Aug 2020 03:17:09 +0000 (20:17 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 14 Aug 2020 14:46:30 +0000 (07:46 -0700)
lib/sfio/sfsetbuf.c

index 2d25ee95cec0489dec11fa8591261750a96e0a93..302865aa8aaf52a19324baec95e5e9d7cfb5e7cb 100644 (file)
@@ -273,7 +273,7 @@ void *sfsetbuf(reg Sfio_t * f, reg void * buf, reg size_t size)
            f->endb = f->data + size;
     }
 
-    f->flags = (f->flags & ~SF_MALLOC) | sf_malloc;
+    f->flags = (unsigned short)((f->flags & ~SF_MALLOC) | sf_malloc);
 
     if (obuf && obuf != f->data && osize > 0 && (oflags & SF_MALLOC)) {
        free((void *) obuf);