* [PATCH] die: fix inconsistencies with header
@ 2023-01-19 19:34 Rose via GitGitGadget
2023-01-19 20:28 ` [PATCH v2] die: fix inconsistencies with usage header Rose via GitGitGadget
0 siblings, 1 reply; 3+ messages in thread
From: Rose via GitGitGadget @ 2023-01-19 19:34 UTC (permalink / raw)
To: git; +Cc: Rose, Seija Kijin
From: Seija Kijin <doremylover123@gmail.com>
The headers for the die and usage functions
have different parameter names or are missing
the "NORETURN" attribute
Signed-off-by: Seija Kijin <doremylover123@gmail.com>
---
die: fix inconsistencies with header
The headers for the die and usage functions have different parameter
names or are missing the "NORETURN" attribute
Signed-off-by: Seija Kijin doremylover123@gmail.com
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1439%2FAtariDreams%2Fperror-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1439/AtariDreams/perror-v1
Pull-Request: https://github.com/git/git/pull/1439
contrib/credential/osxkeychain/git-credential-osxkeychain.c | 2 +-
contrib/credential/wincred/git-credential-wincred.c | 2 +-
usage.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
index e29cc28779d..fa88d621865 100644
--- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c
+++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
@@ -11,7 +11,7 @@ static char *password;
static UInt16 port;
__attribute__((format (printf, 1, 2)))
-static void die(const char *err, ...)
+static void NORETURN die(const char *err, ...)
{
char msg[4096];
va_list params;
diff --git a/contrib/credential/wincred/git-credential-wincred.c b/contrib/credential/wincred/git-credential-wincred.c
index ead6e267c78..c0610d7648c 100644
--- a/contrib/credential/wincred/git-credential-wincred.c
+++ b/contrib/credential/wincred/git-credential-wincred.c
@@ -12,7 +12,7 @@
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
__attribute__((format (printf, 1, 2)))
-static void die(const char *err, ...)
+static void NORETURN die(const char *err, ...)
{
char msg[4096];
va_list params;
diff --git a/usage.c b/usage.c
index 5a7c6c346c1..5f5510ceeeb 100644
--- a/usage.c
+++ b/usage.c
@@ -206,7 +206,7 @@ static const char *fmt_with_err(char *buf, int n, const char *fmt)
return buf;
}
-void NORETURN die_errno(const char *fmt, ...)
+void NORETURN die_errno(const char *err, ...)
{
char buf[1024];
va_list params;
@@ -217,8 +217,8 @@ void NORETURN die_errno(const char *fmt, ...)
exit(128);
}
- va_start(params, fmt);
- die_routine(fmt_with_err(buf, sizeof(buf), fmt), params);
+ va_start(params, err);
+ die_routine(fmt_with_err(buf, sizeof(buf), err), params);
va_end(params);
}
base-commit: a7caae2729742fc80147bca1c02ae848cb55921a
--
gitgitgadget
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2] die: fix inconsistencies with usage header
2023-01-19 19:34 [PATCH] die: fix inconsistencies with header Rose via GitGitGadget
@ 2023-01-19 20:28 ` Rose via GitGitGadget
2024-12-18 3:28 ` [PATCH v3] " AreaZR via GitGitGadget
0 siblings, 1 reply; 3+ messages in thread
From: Rose via GitGitGadget @ 2023-01-19 20:28 UTC (permalink / raw)
To: git; +Cc: Rose, Seija Kijin
From: Seija Kijin <doremylover123@gmail.com>
The headers for the die and usage functions
have different parameter names or are missing
the "NORETURN" attribute
Signed-off-by: Seija Kijin <doremylover123@gmail.com>
---
die: fix inconsistencies with header
The headers for the die and usage functions have different parameter
names or are missing the "NORETURN" attribute
Signed-off-by: Seija Kijin doremylover123@gmail.com
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1439%2FAtariDreams%2Fperror-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1439/AtariDreams/perror-v2
Pull-Request: https://github.com/git/git/pull/1439
Range-diff vs v1:
1: 74e90f0fa5c ! 1: c3b436cea9d die: fix inconsistencies with header
@@ Metadata
Author: Seija Kijin <doremylover123@gmail.com>
## Commit message ##
- die: fix inconsistencies with header
+ die: fix inconsistencies with usage header
The headers for the die and usage functions
have different parameter names or are missing
contrib/credential/osxkeychain/git-credential-osxkeychain.c | 2 +-
contrib/credential/wincred/git-credential-wincred.c | 2 +-
usage.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
index e29cc28779d..fa88d621865 100644
--- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c
+++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c
@@ -11,7 +11,7 @@ static char *password;
static UInt16 port;
__attribute__((format (printf, 1, 2)))
-static void die(const char *err, ...)
+static void NORETURN die(const char *err, ...)
{
char msg[4096];
va_list params;
diff --git a/contrib/credential/wincred/git-credential-wincred.c b/contrib/credential/wincred/git-credential-wincred.c
index ead6e267c78..c0610d7648c 100644
--- a/contrib/credential/wincred/git-credential-wincred.c
+++ b/contrib/credential/wincred/git-credential-wincred.c
@@ -12,7 +12,7 @@
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
__attribute__((format (printf, 1, 2)))
-static void die(const char *err, ...)
+static void NORETURN die(const char *err, ...)
{
char msg[4096];
va_list params;
diff --git a/usage.c b/usage.c
index 5a7c6c346c1..5f5510ceeeb 100644
--- a/usage.c
+++ b/usage.c
@@ -206,7 +206,7 @@ static const char *fmt_with_err(char *buf, int n, const char *fmt)
return buf;
}
-void NORETURN die_errno(const char *fmt, ...)
+void NORETURN die_errno(const char *err, ...)
{
char buf[1024];
va_list params;
@@ -217,8 +217,8 @@ void NORETURN die_errno(const char *fmt, ...)
exit(128);
}
- va_start(params, fmt);
- die_routine(fmt_with_err(buf, sizeof(buf), fmt), params);
+ va_start(params, err);
+ die_routine(fmt_with_err(buf, sizeof(buf), err), params);
va_end(params);
}
base-commit: a7caae2729742fc80147bca1c02ae848cb55921a
--
gitgitgadget
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v3] die: fix inconsistencies with usage header
2023-01-19 20:28 ` [PATCH v2] die: fix inconsistencies with usage header Rose via GitGitGadget
@ 2024-12-18 3:28 ` AreaZR via GitGitGadget
0 siblings, 0 replies; 3+ messages in thread
From: AreaZR via GitGitGadget @ 2024-12-18 3:28 UTC (permalink / raw)
To: git; +Cc: AreaZR, Seija Kijin
From: Seija Kijin <doremylover123@gmail.com>
The headers for the die and usage functions
have different parameter names or are missing
the "NORETURN" attribute
Signed-off-by: Seija Kijin <doremylover123@gmail.com>
---
die: fix inconsistencies with header
The headers for the die and usage functions have different parameter
names or are missing the "NORETURN" attribute
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1439%2FAreaZR%2Fperror-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1439/AreaZR/perror-v3
Pull-Request: https://github.com/git/git/pull/1439
Range-diff vs v2:
1: c3b436cea9d ! 1: e02d5982a4f die: fix inconsistencies with usage header
@@ Commit message
Signed-off-by: Seija Kijin <doremylover123@gmail.com>
- ## contrib/credential/osxkeychain/git-credential-osxkeychain.c ##
-@@ contrib/credential/osxkeychain/git-credential-osxkeychain.c: static char *password;
- static UInt16 port;
-
- __attribute__((format (printf, 1, 2)))
--static void die(const char *err, ...)
-+static void NORETURN die(const char *err, ...)
- {
- char msg[4096];
- va_list params;
-
## contrib/credential/wincred/git-credential-wincred.c ##
@@
+
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
- __attribute__((format (printf, 1, 2)))
+-__attribute__((format (printf, 1, 2)))
-static void die(const char *err, ...)
++__attribute__((format (printf, 1, 2), __noreturn__))
+static void NORETURN die(const char *err, ...)
{
char msg[4096];
contrib/credential/wincred/git-credential-wincred.c | 4 ++--
usage.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/contrib/credential/wincred/git-credential-wincred.c b/contrib/credential/wincred/git-credential-wincred.c
index 4be0d58cd89..9e1b590d27b 100644
--- a/contrib/credential/wincred/git-credential-wincred.c
+++ b/contrib/credential/wincred/git-credential-wincred.c
@@ -12,8 +12,8 @@
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
-__attribute__((format (printf, 1, 2)))
-static void die(const char *err, ...)
+__attribute__((format (printf, 1, 2), __noreturn__))
+static void NORETURN die(const char *err, ...)
{
char msg[4096];
va_list params;
diff --git a/usage.c b/usage.c
index 29a9725784a..991efe25a54 100644
--- a/usage.c
+++ b/usage.c
@@ -210,7 +210,7 @@ static const char *fmt_with_err(char *buf, int n, const char *fmt)
return buf;
}
-void NORETURN die_errno(const char *fmt, ...)
+void NORETURN die_errno(const char *err, ...)
{
char buf[1024];
va_list params;
@@ -221,8 +221,8 @@ void NORETURN die_errno(const char *fmt, ...)
exit(128);
}
- va_start(params, fmt);
- die_routine(fmt_with_err(buf, sizeof(buf), fmt), params);
+ va_start(params, err);
+ die_routine(fmt_with_err(buf, sizeof(buf), err), params);
va_end(params);
}
base-commit: d882f382b3d939d90cfa58d17b17802338f05d66
--
gitgitgadget
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-18 3:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-19 19:34 [PATCH] die: fix inconsistencies with header Rose via GitGitGadget
2023-01-19 20:28 ` [PATCH v2] die: fix inconsistencies with usage header Rose via GitGitGadget
2024-12-18 3:28 ` [PATCH v3] " AreaZR via GitGitGadget
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).