Replace "%z" modifier with glib macro for portability.
authorRobin Gareus <robin@gareus.org>
Thu, 30 Jul 2015 15:00:03 +0000 (17:00 +0200)
committerRobin Gareus <robin@gareus.org>
Thu, 30 Jul 2015 15:00:03 +0000 (17:00 +0200)
libs/canvas/stateful_image.cc
libs/evoral/src/libsmf/smf_decode.c
libs/evoral/src/libsmf/smf_save.c

index b62da9cc8ccfeb0a535a29bfcca677136b30c754..f5cc76dd039694e1bbaf9b1c51b4760ef5ba8dca 100644 (file)
@@ -101,7 +101,7 @@ StatefulImage::load_states (const XMLNode& node)
                        error << _("no ID for state") << endmsg;
                        continue;
                }
-               sscanf (prop->value().c_str(), "%zd", &id);
+               sscanf (prop->value().c_str(), "%" G_GSIZE_FORMAT, &id);
 
                if ((prop = (*i)->property ("image")) == 0) {
                        error << _("no image for state") << endmsg;
index 031577cb23de842d6867e63ad522dfef2e224317..d527cf178a165237c9da18a24b8df80a8ce8614d 100644 (file)
@@ -277,7 +277,7 @@ smf_event_decode_metadata(const smf_event_t *event)
                        break;
 
                case 0x7F:
-                       off += snprintf(buf + off, BUFFER_SIZE - off, "Proprietary (aka Sequencer) Event, length %zu",
+                       off += snprintf(buf + off, BUFFER_SIZE - off, "Proprietary (aka Sequencer) Event, length %" G_GSIZE_FORMAT,
                                event->midi_buffer_length);
                        break;
 
index 05c6641b03c4cfaf7c495f5edbbfb8bcb45c8274..937409ae3671fc8859cd97239a7c2010b2f68861 100644 (file)
@@ -519,7 +519,7 @@ smf_validate(smf_t *smf)
                        assert(event);
 
                        if (!smf_event_is_valid(event)) {
-                               g_critical("Event #%zu on track #%d is invalid.", eventno, trackno);
+                               g_critical("Event #%" G_GSIZE_FORMAT " on track #%d is invalid.", eventno, trackno);
                                return (-5);
                        }