linkcatkeys: Avoid discarding potential error values.
Spotted by Clang and the [[nodiscard]] patch.
This commit is contained in:
@@ -127,8 +127,9 @@ main(int argc, char **argv)
|
|||||||
case TARGET_ATTRIBUTE: {
|
case TARGET_ATTRIBUTE: {
|
||||||
BEntry entry(outputFile.String());
|
BEntry entry(outputFile.String());
|
||||||
entry_ref eref;
|
entry_ref eref;
|
||||||
entry.GetRef(&eref);
|
res = entry.GetRef(&eref);
|
||||||
res = targetCatImpl.WriteToAttribute(eref);
|
if (res == B_OK)
|
||||||
|
res = targetCatImpl.WriteToAttribute(eref);
|
||||||
if (res != B_OK) {
|
if (res != B_OK) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"couldn't write target-attribute to %s - error: %s\n",
|
"couldn't write target-attribute to %s - error: %s\n",
|
||||||
@@ -140,8 +141,9 @@ main(int argc, char **argv)
|
|||||||
case TARGET_RESOURCE: {
|
case TARGET_RESOURCE: {
|
||||||
BEntry entry(outputFile.String());
|
BEntry entry(outputFile.String());
|
||||||
entry_ref eref;
|
entry_ref eref;
|
||||||
entry.GetRef(&eref);
|
res = entry.GetRef(&eref);
|
||||||
res = targetCatImpl.WriteToResource(eref);
|
if (res == B_OK)
|
||||||
|
res = targetCatImpl.WriteToResource(eref);
|
||||||
if (res != B_OK) {
|
if (res != B_OK) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"couldn't write target-resource to %s - error: %s\n",
|
"couldn't write target-resource to %s - error: %s\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user