Skip to content
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

Remove some compilation and CI warnings #21

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
submodules: "recursive"

- name: Cache gmp build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
depends/gmp
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
cd ../

- name: Cache circuits
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
circuits
Expand All @@ -126,23 +126,23 @@ jobs:
./run_tests.sh

- name: upload macOS arm64 artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: witnesscalc-macOS-arm64
path: |
package
if-no-files-found: error

- name: upload iOS artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: witnesscalc-iOS
path: |
package_ios
if-no-files-found: error

- name: upload iOS Simulator artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: witnesscalc-iOS-Simulator
path: |
Expand All @@ -163,7 +163,7 @@ jobs:
version: 1.0

- name: Cache gmp build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
depends/gmp
Expand All @@ -189,23 +189,23 @@ jobs:
run: make android_x86_64

- name: upload Linux amd64 artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: witnesscalc-linux-amd64
path: |
package
if-no-files-found: error

- name: upload Android artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: witnesscalc-Android
path: |
package_android
if-no-files-found: error

- name: upload Android x86_64 artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: witnesscalc-Android-x86_64
path: |
Expand Down
5 changes: 3 additions & 2 deletions build/fr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ char *Fr_element2str(PFrElement pE) {
mpz_t r;
if (!(pE->type & Fr_LONG)) {
if (pE->shortVal>=0) {
char *r = new char[32];
sprintf(r, "%d", pE->shortVal);
const size_t rLn = 32;
char *r = new char[rLn];
snprintf(r, rLn, "%d", pE->shortVal);
return r;
} else {
mpz_init_set_si(r, pE->shortVal);
Expand Down
5 changes: 3 additions & 2 deletions src/calcwit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ void Circom_CalcWit::setInputSignal(u64 h, uint i, FrElement & val){
uint si = circuit->InputHashMap[pos].signalid+i;
if (inputSignalAssigned[si-get_main_input_signal_start()]) {
fprintf(stderr, "Signal assigned twice: %d\n", si);
char err[256];
sprintf(err, "Signal assigned twice: %d", si);
const size_t errLn = 256;
char err[errLn];
snprintf(err, errLn, "Signal assigned twice: %d", si);
throw std::runtime_error(err);
}
signalValues[si] = val;
Expand Down
2 changes: 1 addition & 1 deletion src/witnesscalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Circom_Circuit* loadCircuit(const void *buffer, unsigned long buffer_size) {
templateInsId2IOSignalInfo1[index[i]] = p;
}
}
circuit->templateInsId2IOSignalInfo = move(templateInsId2IOSignalInfo1);
circuit->templateInsId2IOSignalInfo = std::move(templateInsId2IOSignalInfo1);

return circuit;
}
Expand Down