]
fsm = ResetInserter()(FSM(reset_state="IDLE"))
- timer = WaitTimer(clk_freq//10)
+ timer = WaitTimer(int(clk_freq//10))
self.submodules += fsm, timer
self.comb += [
fsm.reset.eq(timer.done),
return x > 0 ? x : -x;
}
-unsigned long strtoul(const char *nptr, char **endptr, int base);
+unsigned long strtoul(const char *nptr, char **endptr, unsigned int base);
long strtol(const char *nptr, char **endptr, int base);
double strtod(const char *str, char **endptr);
* @endptr: A pointer to the end of the parsed string will be placed here
* @base: The number base to use
*/
-unsigned long strtoul(const char *nptr, char **endptr, int base)
+unsigned long strtoul(const char *nptr, char **endptr, unsigned int base)
{
unsigned long result = 0,value;
*/
int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
{
- int i;
+ size_t i;
i=vsnprintf(buf,size,fmt,args);
return (i >= size) ? (size - 1) : i;
int scnprintf(char * buf, size_t size, const char *fmt, ...)
{
va_list args;
- int i;
+ size_t i;
va_start(args, fmt);
i = vsnprintf(buf, size, fmt, args);
pn = (char *) base + nmemb * size;
r = min(pa - (char *)base, pb - pa);
vecswap(base, pb - r, r);
- r = min(pd - pc, pn - pd - size);
+ r = min(pd - pc, pn - pd - (int)size);
vecswap(pb, pn - r, r);
- if ((r = pb - pa) > size)
+ if ((r = pb - pa) > (int)size)
{
qsort(base, r / size, size, compar);
}
- if ((r = pd - pc) > size)
+ if ((r = pd - pc) > (int)size)
{
/* Iterate rather than recurse to save stack space */
base = pn - r;
switch (*p)
{
case '-':
- negative = 1; /* Fall through to increment position */
+ negative = 1; /* FALLTHRU */ /* to increment position */
case '+':
p++;
}
switch(*++p)
{
case '-':
- negative = 1; /* Fall through to increment pos */
+ negative = 1; /* FALLTHRU */ /* to increment pos */
case '+':
p++;
}
case 'X':
flags |= PRINTF_LARGE;
+ /* FALLTHRU */
case 'x':
base = 16;
break;