|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH 4/4] lib/nolibc: adapt sscanf code for Unikraft
On 07/27/2018 05:29 PM, Yuri Volchkov wrote: 1) Use the right includes 2) (u_)quad_t => (u)int64_t 3) u_char => unsigned char 4) strto(u)q => strto(u)ll 5) bcopy => memmove 6) fix warnings generated by modern gcc (8.1.1) That's the explicit casts to ccfntype and int that you added? diff --git a/lib/nolibc/include/stdio.h b/lib/nolibc/include/stdio.h index 073b132..6d5652f 100644 --- a/lib/nolibc/include/stdio.h +++ b/lib/nolibc/include/stdio.h @@ -64,6 +64,9 @@ int fflush(FILE *fp); int vprintf(const char *fmt, va_list ap); int printf(const char *fmt, ...) __printf(1, 2);+int vsscanf(const char *str, const char *fmt, va_list ap);+int sscanf(const char *str, const char *fmt, ...) __scanf(2, 3); I would align the __scanf with the preceding __printf statement for consistency.
Whenever you added your explicit cast, you put a space there; when you only changed the function name, you left it without a space. Could you make this consistent? (I personally prefer the version without a space for casts, but I don't think we have a coding style rule for it. Just consistent inside the same switch statement would be nice.) This applies to the ones, below, too: case 'u': That last bit is unrelated to the rest of the patch? _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |