From: Uwe Hermann Date: Sat, 19 Jan 2013 21:00:39 +0000 (+0100) Subject: Add missing "ULL" suffixes. X-Git-Tag: dsupstream~341 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=5edc02c77c3576a47ee85241f32785cdf0fdddf8;p=libsigrok.git Add missing "ULL" suffixes. These numbers are larger than 32bit, mark them as ULL to avoid compile failures on 32bit systems. --- diff --git a/hardware/asix-sigma/asix-sigma.c b/hardware/asix-sigma/asix-sigma.c index 9e8c3c86..3c6b3e2c 100644 --- a/hardware/asix-sigma/asix-sigma.c +++ b/hardware/asix-sigma/asix-sigma.c @@ -671,7 +671,7 @@ static int set_samplerate(const struct sr_dev_inst *sdi, uint64_t samplerate) } devc->cur_samplerate = samplerate; - devc->period_ps = 1000000000000 / samplerate; + devc->period_ps = 1000000000000ULL / samplerate; devc->samples_per_event = 16 / devc->num_probes; devc->state.state = SIGMA_IDLE; diff --git a/strutil.c b/strutil.c index 2c4d5c81..5ac9b719 100644 --- a/strutil.c +++ b/strutil.c @@ -404,11 +404,11 @@ SR_API int sr_parse_period(const char *periodstr, struct sr_rational *r) while (*s == ' ') s++; if (!strcmp(s, "fs")) - r->q = 1000000000000000L; + r->q = 1000000000000000ULL; else if (!strcmp(s, "ps")) - r->q = 1000000000000L; + r->q = 1000000000000ULL; else if (!strcmp(s, "ns")) - r->q = 1000000000L; + r->q = 1000000000ULL; else if (!strcmp(s, "us")) r->q = 1000000; else if (!strcmp(s, "ms"))