Anonymous
Aura
/warn read the rules
That rule just got implemented and you are warning someone from the time when it wasn't there🤦🏻♂️
Anonymous
Nomid Íkorni-Sciurus
Aura
Anonymous
Aura
Same*
Anonymous
why do i get this error? (assuming i have managed to fix the previous error)
if ((adps_mode < 0) && (1 < adps_mode)) {
error: overlapping comparisons always evaluate to false
Anonymous
Anonymous
o.o
Anonymous
o.o
That's what the error says
Anonymous
*has no idea what its error condition should be*
Anonymous
// error: adps_mode cannot be less than 0 and greater than 1
if ((adps_mode < 0) && (1 < adps_mode)) {
WL_ERR(("%s: Invalid value %d.\n", FUNCTION, adps_mode));
return -EINVAL;
}
Anonymous
;-;
Anonymous
Anonymous
i have no idea what it's documentation is for the function
Anonymous
and what its error conditions are meant to be
Anonymous
and searching the function name only shows 1 result (0.29 seconds)
Anonymous
which is just source code same to what i have
klimi
and what are you trying to achieve?
Anonymous
compile AOSP kernel
drivers/net/wireless/bcmdhd4361/wl_android.c:7107:22: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare]
if ((adps_mode < 0) && (1 < adps_mode)) {
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
1 error generated.
klimi
oh...
Anonymous
Anonymous
Anonymous
Anonymous
Anonymous
?
Anonymous
?
I answered the question
Anonymous
so it can only be 0 or 1?
Anonymous
ok :)
Anonymous
so this? if ((adps_mode < 0) || (adps_mode > 1)) {
Anonymous
Anonymous
:)
Anonymous
Make an issue to them
Anonymous
now for a tricky one...
Anonymous
kernel/samsung/universal8895/drivers/media/platform/exynos/fimc-is2/vendor/mcd/fimc-is-sysfs.c:248:40: error: expression does not compute the number of elements in this array; element type is 'struct ssrm_camera_data', not 'int' [-Werror,-Wsizeof-array-div]
if (ret_count > sizeof(SsrmCameraInfo)/sizeof(int))
~~~~~~~~~~~~~~ ^
Anonymous
Anonymous
does it need to be sizeof(struct SsrmCameraInfo)/sizeof(int) instead?
Anonymous
Anonymous
;-;
Anonymous
Anonymous
The code
Anonymous
https://gist.github.com/Total-Control-9985/e807b9f467eb6a8d245439c29422d6db
this is the entire function
Anonymous
;-;
So this is your chance to became Android contributor!
Anonymous
lol
Anonymous
wait wtf?
universal8895/drivers/media/platform/exynos/fimc-is2/vendor/mcd/fimc-is-sysfs.c:248:40: error: expression does not compute the number of elements in this array; element type is 'struct ssrm_camera_data', not 'int' [-Werror,-Wsizeof-array-div]
if (ret_count > sizeof(SsrmCameraInfo)/sizeof(int))
~~~~~~~~~~~~~~ ^
universal8895/drivers/media/platform/exynos/fimc-is2/vendor/mcd/fimc-is-sysfs.c:112:25: note: array 'SsrmCameraInfo' declared here
struct ssrm_camera_data SsrmCameraInfo[FIMC_IS_SENSOR_COUNT];
^
universal8895/drivers/media/platform/exynos/fimc-is2/vendor/mcd/fimc-is-sysfs.c:248:40: note: place parentheses around the 'sizeof(int)' expression to silence this warning
if (ret_count > sizeof(SsrmCameraInfo)/sizeof(int))
^
1 error generated.
Anonymous
how tf would adding parenthesis make it valid? o.o
Anonymous
Anonymous
It's just a way to silence the warning
Anonymous
Probably it's intended to be sizeof(struct ssrm_camera_data)
Anonymous
what does sizeo(a) return if int a[5] ?
Anonymous
Anonymous
ok
Anonymous
so for struct ssrm_camera_data SsrmCameraInfo[FIMC_IS_SENSOR_COUNT];
it would be if (ret_count > FIMC_IS_SENSOR_COUNT * sizeof(int)) ?
Anonymous
Anonymous
Anonymous
hmm ok :)
Anonymous
*builds and sees if the errors have been fixed :) *
Anonymous
@smallville7123
Anonymous
Probably it's intended to be sizeof(struct ssrm_camera_data)
Anonymous
Anonymous
error: incompatible pointer to integer conversion passing 'char const[16]' to parameter of type 'long' [-Werror,-Wint-conversion]
if (__builtin_expect((*el_dev)->name, 0)) {
:(
Victor
Hi I am from Venezuela, I have learn some java, php, python by myself but I don't know how to get started with C++, can someone recommend me a PDF to learn C++?
Anonymous
hmm https://stackoverflow.com/a/20916491
Anonymous
Anonymous
would this be a valid fix for this?
error: 'sprintf' will always overflow; destination buffer has size 16, but format string expands to at least 17 [-Werror,-Wfortify-source]
sprintf(buf, "U%dH%dL%dX%dQ%dR%dW%dF%d",
char tmp[17];
char buf[16];
// ...
sprintf(tmp, "U%dH%dL%dX%dQ%dR%dW%dF%d",
// ...
memcpy(buf, tmp, 16);
Victor
Victor
What do you think is the best GUI library?
Anonymous
Anonymous
It really depends on what your goal is. Do you value free software? Do you value cross platform compatibility? Do you value features and eye candy or do you prefer less bloat and speed?
Anonymous
I'm a big fan of both FLTK and wxwidgets. The most "C++" library i have tried was nanacpp, but it is very limited in what it can do (at least from what i got). There are a couple other ones that are good. Honestly if you are just developing for windows the winapi is not too bad. I usually just write my own wrappers around that for windows or use that raw. On GNU/Linux systems, just use the same thing your DE uses to get a consistant look. In most cases that would be GTK or Qt
Anonymous
I need help in one of my c++ program
Anonymous
Can any one?
Victor