Stream: Google Summer of Code

Topic: Code Break


view this post on Zulip Shubham Rathore (Jul 23 2018 at 18:56):

@Saran Narayan Could you please look into one of your commits pertaining to "check_overlaps.c" . The variable check_plot seems to be uninitialized in some cases where if() stands false, which is breaking the code. Please rectify the snippet. Cheers !

view this post on Zulip Saran Narayan (Jul 23 2018 at 19:19):

I think I found the derp I did https://hastebin.com/ligoxiwuya

view this post on Zulip Saran Narayan (Jul 23 2018 at 19:20):

but the error you say is different

view this post on Zulip Saran Narayan (Jul 23 2018 at 19:20):

I am wondering why the error never showed up to me while I was building

view this post on Zulip Shubham Rathore (Jul 23 2018 at 19:23):

What flags do you use with cmake ?

view this post on Zulip Saran Narayan (Jul 23 2018 at 19:24):

no flags :/ just cmake ..

view this post on Zulip Sean (Jul 23 2018 at 19:25):

different versions of gcc/llvm and different compilation settings produce different warnings (which we turn into failures in our build)

view this post on Zulip Sean (Jul 23 2018 at 19:25):

best to just fix them as you find them and not worry about it -- they're typically trivial to resolve

view this post on Zulip Sean (Jul 23 2018 at 19:26):

only way to be really sure is to make sure one has the very latest version of the compiler and compiles both with and without optimization enabled

view this post on Zulip Sean (Jul 23 2018 at 19:27):

and then do it all over again with the other compiler (gcc/llvm) ;)

view this post on Zulip Sean (Jul 23 2018 at 19:27):

four full builds is best automated

view this post on Zulip Saran Narayan (Jul 23 2018 at 19:30):

welp that is too much work

view this post on Zulip Sean (Jul 23 2018 at 19:30):

that's why it's best to just fix them as we find them ;)

view this post on Zulip Saran Narayan (Jul 23 2018 at 19:30):

yeah :) will commit it

view this post on Zulip Saran Narayan (Jul 23 2018 at 19:30):

but still not sure what the problem is :D

view this post on Zulip Shubham Rathore (Jul 23 2018 at 19:32):

commit it, lets see

view this post on Zulip Saran Narayan (Jul 23 2018 at 19:33):

svn up :)

view this post on Zulip Shubham Rathore (Jul 23 2018 at 19:57):

Works :simple_smile:

view this post on Zulip Saran Narayan (Jul 23 2018 at 19:57):

great. Thank you for testing :)

view this post on Zulip Shubham Rathore (Jul 29 2018 at 05:50):

@starseeker error: missing field 'cflag' initializer [-Werror,-Wmissing-field-initializers]
struct _ged_ls_flags ls_flags = {0};
Could you help me on this . :)

view this post on Zulip starseeker (Jul 29 2018 at 12:37):

@Shubham Rathore does r71296 fix it?

view this post on Zulip Shubham Rathore (Jul 29 2018 at 13:02):

Ah... initialization. Yes it does ! :)

view this post on Zulip Cezar (Aug 04 2018 at 17:18):

i can't build the code, because log_overlaps (and possibly others) is defined in both libged/check_overlaps.c and libged/check/check_overlaps.c. i don't know which one is the redundant one

view this post on Zulip Saran Narayan (Aug 04 2018 at 17:21):

oh okay on it :)

view this post on Zulip Cezar (Aug 04 2018 at 17:21):

thanks ^^

view this post on Zulip Saran Narayan (Aug 04 2018 at 17:21):

BTW @Cezar getting this build error:

/home/sharan/brlcad/mod_ssh/src/libbu/hook.c: In function ‘bu_hook_list_init’:
/home/sharan/brlcad/mod_ssh/src/libbu/hook.c:42:13: error: request for implicit conversion from ‘void *’ to ‘struct bu_hook *’ not permitted in C++ [-Werror=c++-compat]
  hlp->hooks = bu_malloc(
             ^
/home/sharan/brlcad/mod_ssh/src/libbu/hook.c: In function ‘bu_hook_add’:
/home/sharan/brlcad/mod_ssh/src/libbu/hook.c:56:13: error: request for implicit conversion from ‘void *’ to ‘struct bu_hook *’ not permitted in C++ [-Werror=c++-compat]
  hlp->hooks = bu_realloc(
             ^
cc1: all warnings being treated as errors

view this post on Zulip Saran Narayan (Aug 04 2018 at 17:22):

not sure why, the hooks is a void *

view this post on Zulip Cezar (Aug 04 2018 at 17:23):

uh, the result of bu_malloc is void * and it needs to be converted to whatever the left-hand's type is (struct bu_hook in this case)

view this post on Zulip Cezar (Aug 04 2018 at 17:23):

i'm not getting this error on my compiler, so i keep forgetting to add the cast when writing code like this

view this post on Zulip Cezar (Aug 04 2018 at 17:23):

sorry about that, i'll fix it

view this post on Zulip Saran Narayan (Aug 04 2018 at 17:23):

cool thank you :)

view this post on Zulip Saran Narayan (Aug 04 2018 at 17:26):

omg it is popping on many other files as well :/

view this post on Zulip Saran Narayan (Aug 04 2018 at 17:27):

lemme fix it :)

view this post on Zulip Cezar (Aug 04 2018 at 17:27):

i've committed a fix now

view this post on Zulip Saran Narayan (Aug 04 2018 at 17:27):

okk lets see

view this post on Zulip Saran Narayan (Aug 04 2018 at 17:28):

now happens in redblack.c

view this post on Zulip Cezar (Aug 04 2018 at 17:28):

ye, forgot about that one, fixing it now

view this post on Zulip Cezar (Aug 04 2018 at 17:29):

hopefully it's fine now

view this post on Zulip Saran Narayan (Aug 04 2018 at 17:32):

yup now looks fine :)

view this post on Zulip Cezar (Aug 04 2018 at 17:37):

by the way, are you able to build mged?

view this post on Zulip Saran Narayan (Aug 04 2018 at 17:38):

yep

view this post on Zulip Saran Narayan (Aug 04 2018 at 17:38):

oh okay on it :)

up now


Last updated: Nov 16 2024 at 00:47 UTC