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

index 6b2628b7f672cfde3ef33f8beb4bcdf297accc31..7d07e7aa7fa56de288d0c6f0fc107bf403836c0a 100644 (file)
@@ -89,7 +89,7 @@ Sfio_t *sfnew(Sfio_t * oldf, void * buf, size_t size, int file,
 
     /* stream type */
     f->mode = (flags & SF_READ) ? SF_READ : SF_WRITE;
-    f->flags = (flags & SF_FLAGS) | (sflags & (SF_MALLOC | SF_STATIC));
+    f->flags = (unsigned short)((flags & SF_FLAGS) | (sflags & (SF_MALLOC | SF_STATIC)));
     f->bits = (flags & SF_RDWR) == SF_RDWR ? SF_BOTH : 0;
     f->file = file;
     f->here = f->extent = 0;