diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index a706de712b..75f930bf8d 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -860,7 +860,7 @@ AudioTrack::freeze (InterThreadInfo& itt) uint32_t n = 1; - while (n < (ULONG_MAX-1)) { + while (n < (UINT_MAX-1)) { string candidate; @@ -875,7 +875,7 @@ AudioTrack::freeze (InterThreadInfo& itt) } - if (n == (ULONG_MAX-1)) { + if (n == (UINT_MAX-1)) { error << string_compose (X_("There Are too many frozen versions of playlist \"%1\"" " to create another one"), _freeze_record.playlist->name()) << endmsg; diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 058db6d250..021c2935d2 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -1566,7 +1566,7 @@ Session::new_audio_track (int input_channels, int output_channels) } n++; - } while (n < (ULONG_MAX-1)); + } while (n < (UINT_MAX-1)); if (input_auto_connect & AutoConnectPhysical) { nphysical_in = n_physical_inputs; @@ -1673,7 +1673,7 @@ Session::new_audio_route (int input_channels, int output_channels) } n++; - } while (n < (ULONG_MAX-1)); + } while (n < (UINT_MAX-1)); try { bus = new Route (*this, bus_name, -1, -1, -1, -1); @@ -2153,7 +2153,7 @@ Session::new_region_name (string old) } - while (number < (ULONG_MAX-1)) { + while (number < (UINT_MAX-1)) { AudioRegionList::const_iterator i; string sbuf; @@ -2174,7 +2174,7 @@ Session::new_region_name (string old) } } - if (number != (ULONG_MAX-1)) { + if (number != (UINT_MAX-1)) { return buf; } diff --git a/libs/pbd3/dirname.cc b/libs/pbd3/dirname.cc index 8945b6e969..6b97ac7e3a 100644 --- a/libs/pbd3/dirname.cc +++ b/libs/pbd3/dirname.cc @@ -23,7 +23,7 @@ PBD::dirname (const char *path) len = (size_t) (slash - path); ret = (char *) malloc (sizeof (char) * (len + 1)); - snprintf (ret, len, "%*s", len, path); + snprintf (ret, len, "%*s", (int)len, path); return ret; }