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

Breaks on i386 architectrures: non-constant-expression cannot be narrowed from type 'unsigned long long' to 'size_t' #2267

Closed
yurivict opened this issue Sep 22, 2020 · 2 comments
Labels

Comments

@yurivict
Copy link
Contributor

/wrkdirs/usr/ports/graphics/xournalpp/work/xournalpp-cdebec61151f968e6fafb2074be182aff970b0af/src/util/audio/VorbisProducer.cpp:28:33: error: non-constant-expression cannot be narrowed from type 'unsigned long long' to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
        size_t const bufferSize{1024ULL * sfInfo.channels};
                                ^~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/graphics/xournalpp/work/xournalpp-cdebec61151f968e6fafb2074be182aff970b0af/src/util/audio/VorbisProducer.cpp:28:33: note: insert an explicit cast to silence this issue
        size_t const bufferSize{1024ULL * sfInfo.channels};
                                ^~~~~~~~~~~~~~~~~~~~~~~~~
                                static_cast<size_t>(     )
1 error generated.

Log: http://beefy17.nyi.freebsd.org/data/head-i386-default/p549547_s365984/logs/xournalpp-1.0.18.20200819.log (IPv6 URL)

FreeBSD 11/12/13
clang-8/9/10/11

@yurivict yurivict added the bug label Sep 22, 2020
@yurivict yurivict changed the title Breaks on i386 archutectrures: non-constant-expression cannot be narrowed from type 'unsigned long long' to 'size_t' Breaks on i386 architectrures: non-constant-expression cannot be narrowed from type 'unsigned long long' to 'size_t' Sep 22, 2020
@Febbe
Copy link
Collaborator

Febbe commented Sep 22, 2020

Xournal++ is only supported on 64bit machines. Even if you can compile it, it will show an empty document. But you can provide a very simple PR to fix that: size_t const bufferSize{size_t(1024U) * sfInfo.channels};

@yurivict
Copy link
Contributor Author

#2270

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants