mirror of
https://github.com/rfivet/uemacs.git
synced 2025-11-23 11:41:15 -05:00
uemacs: input.c: Fix mkstemp warning.
Fix the following warning: input.c: In function ‘getstring’: input.c:590: warning: ignoring return value of ‘mkstemp’, declared with attribute warn_unused_result This add usage.c module for die function. This also add wrapper.c module for the xmkstemp that is wrapper function around the original mkstemp function. Both module codes was largelly based on git, linux and sparse codes. Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
f28629471c
commit
d6e76cca7b
22
usage.c
Normal file
22
usage.c
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "usage.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
static void report(const char* prefix, const char *err, va_list params)
|
||||
{
|
||||
char msg[4096];
|
||||
vsnprintf(msg, sizeof(msg), err, params);
|
||||
fprintf(stderr, "%s%s\n", prefix, msg);
|
||||
}
|
||||
|
||||
void die(const char* err, ...)
|
||||
{
|
||||
va_list params;
|
||||
|
||||
va_start(params, err);
|
||||
report("fatal: ", err, params);
|
||||
va_end(params);
|
||||
exit(128);
|
||||
}
|
||||
Reference in New Issue
Block a user