id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,mlocked 10478,Commercial flagging array initialization issue,Gary Buhrmaster ,cpinkham,"clang detected in mythtv/programs/mythcommflag/ClassicCommDetector.cpp a warning of the form ""warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it?"" from the following code fragment: memset(sc_histogram, 0, sizeof(sc_histogram)); My guess from reading the code is that the intent was to zero the entire array (and not just the size of the pointer) more or less as: memset(sc_histogram, 0, sizeof(*sc_histogram)*(seconds+1)); (patch attached) However, depending on what memory was allocated (and what its state was) this could substantially change (improve/worsen) commercial detection results. I presume that the SME for commercial flagging needs to carefully evaluate with their test cases the results of this proposed change. Thanks. Gary",Patch - Bug Fix,closed,minor,0.25,MythTV - Mythcommflag,Master Head,medium,fixed,,,0