-
Notifications
You must be signed in to change notification settings - Fork 807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misc compiler warnings on Debian sid #2789
Conversation
@@ -721,41 +721,41 @@ QByteArray encryptStringAsymmetric(EVP_PKEY *publicKey, const QByteArray& data) | |||
auto ctx = PKeyCtx::forKey(publicKey, ENGINE_get_default_RSA()); | |||
if (!ctx) { | |||
qCInfo(lcCse()) << "Could not initialize the pkey context."; | |||
exit(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Callers are not going to handle that change in behavior, so likely needs some error handling up the call stack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly there seems to be no actual error handling in src/libsync/clientsideencryption.cpp
.
So for now the key is just skipped in FolderMetadata::encryptedMetadata()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, definitely. This needs being addressed otherwise it's too much of a behavior change, this will start trickling up and not being blocked later on while right now it has no risk of trickling up and corrupting things (even though it does so in a super aggressive and less than ideal way indeed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the error handling in the callers.
e9d2320
to
081a017
Compare
AppImage file: nextcloud-PR-2789-f4948ff7eed9e81f7cf17700e413739cc67d8af5-x86_64.AppImage |
test/testfolderwatcher.cpp: In function 'void touch(const QString&)': test/testfolderwatcher.cpp:21:11: warning: ignoring return value of 'int system(const char*)' declared with attribute 'warn_unused_result' [-Wunused-result] 21 | system(cmd.toLocal8Bit()); | ~~~~~~^~~~~~~~~~~~~~~~~~~ test/testfolderwatcher.cpp: In function 'void mkdir(const QString&)': test/testfolderwatcher.cpp:33:11: warning: ignoring return value of 'int system(const char*)' declared with attribute 'warn_unused_result' [-Wunused-result] 33 | system(cmd.toLocal8Bit()); | ~~~~~~^~~~~~~~~~~~~~~~~~~ test/testfolderwatcher.cpp: In function 'void rmdir(const QString&)': test/testfolderwatcher.cpp:45:11: warning: ignoring return value of 'int system(const char*)' declared with attribute 'warn_unused_result' [-Wunused-result] 45 | system(cmd.toLocal8Bit()); | ~~~~~~^~~~~~~~~~~~~~~~~~~ test/testfolderwatcher.cpp: In function 'void rm(const QString&)': test/testfolderwatcher.cpp:56:11: warning: ignoring return value of 'int system(const char*)' declared with attribute 'warn_unused_result' [-Wunused-result] 56 | system(cmd.toLocal8Bit()); | ~~~~~~^~~~~~~~~~~~~~~~~~~ test/testfolderwatcher.cpp: In function 'void mv(const QString&, const QString&)': test/testfolderwatcher.cpp:67:11: warning: ignoring return value of 'int system(const char*)' declared with attribute 'warn_unused_result' [-Wunused-result] 67 | system(cmd.toLocal8Bit()); | ~~~~~~^~~~~~~~~~~~~~~~~~~ test/testfolderwatcher.cpp: In member function 'void TestFolderWatcher::testACreate()': test/testfolderwatcher.cpp:152:15: warning: ignoring return value of 'int system(const char*)' declared with attribute 'warn_unused_result' [-Wunused-result] 152 | system(cmd.toLocal8Bit()); | ~~~~~~^~~~~~~~~~~~~~~~~~~ test/testinotifywatcher.cpp: In member function 'void TestInotifyWatcher::cleanupTestCase()': test/testinotifywatcher.cpp:67:18: warning: ignoring return value of 'int system(const char*)' declared with attribute 'warn_unused_result' [-Wunused-result] 67 | system( QString("rm -rf %1").arg(_root).toLocal8Bit() ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Check for a failure in all callers. Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Hello, Thank you for your contribution to the Desktop Client with this pull request. We truly value your support and hope to see more contributions from you in the future! Best regards, |
No description provided.