net: core: Fix IPv6 extra header options handling

If the packet contains IPv6 header + Extra header + ICMPv6 headers,
last header does not contain 'next header and length' fields. So
while parsing header we should first check next header and continue
parsing. Otherwise we parse 2 bytes extra and set invalid ext hdr len
and handover to other layers. So everything goes wrong after that.

Also simplified next header parsing to minimal.

Change-Id: I5d8235c5a57c8b77adf6a07eb8eb74350a3e4dc6
Signed-off-by: Ravi kumar Veeramally <406c082aeb452858c41b213a757768e1c1dff29e@linux.intel.com>

--- subsys/net/ip/net_core.c
+++ subsys/net/ip/net_core.c
@@ -187,6 +187,12 @@
 	return NULL;
 }

+static inline bool is_upper_layer_protocol_header(uint8_t proto)
+{
+	return (proto == IPPROTO_ICMPV6 || proto == IPPROTO_UDP ||
+		proto == IPPROTO_TCP);
+}
+
 static inline enum net_verdict process_ipv6_pkt(struct net_buf *buf)
 {
 	struct net_ipv6_hdr *hdr = NET_IPV6_BUF(buf);
@@ -238,18 +244,9 @@
 	 * headers can be slow so do this checking here. There cannot
 	 * be any extension headers after the upper layer protocol header.
 	 */
-	switch (*(net_nbuf_next_hdr(buf))) {
-	case IPPROTO_ICMPV6:
-		return process_icmpv6_pkt(buf, hdr);
-
-#if defined(CONFIG_NET_UDP)
-	case IPPROTO_UDP:
-		return net_conn_input(IPPROTO_UDP, buf);
-#endif
-#if defined(CONFIG_NET_TCP)
-	case IPPROTO_TCP:
-		return net_conn_input(IPPROTO_TCP, buf);
-#endif
+	next = *(net_nbuf_next_hdr(buf));
+	if (is_upper_layer_protocol_header(next)) {
+		goto upper_proto;
 	}

 	/* Go through the extensions */
@@ -261,25 +258,24 @@
 	while (frag) {
 		enum net_verdict verdict;

+		if (is_upper_layer_protocol_header(next)) {
+			NET_DBG("IPv6 next header %d", next);
+			net_nbuf_set_ext_len(buf, offset -
+					     sizeof(struct net_ipv6_hdr));
+			goto upper_proto;
+		}
+
 		frag = net_nbuf_read_u8(frag, offset, &offset, &next_hdr);
 		frag = net_nbuf_read_u8(frag, offset, &offset, &length);
-		if (!frag) {
+		if (!frag && offset == 0xffff) {
 			goto drop;
 		}

 		length = length * 8 + 8;
 		verdict = NET_OK;

-#if defined(CONFIG_NET_DEBUG_CORE)
 		/* Print the length only for IPv6 extension */
-		if (next != IPPROTO_ICMPV6 && next != IPPROTO_UDP &&
-		    next != IPPROTO_TCP) {
-			NET_DBG("IPv6 next header %d length %d bytes",
-				next, length);
-		} else {
-			NET_DBG("IPv6 next header %d", next);
-		}
-#endif /* CONFIG_NET_DEBUG_CORE */
+		NET_DBG("IPv6 next header %d length %d bytes", next, length);

 		switch (next) {
 		case NET_IPV6_NEXTHDR_NONE:
@@ -291,15 +287,16 @@
 			goto drop;

 		case NET_IPV6_NEXTHDR_HBHO:
+			/* HBH option needs to be the first one */
+			if (first_option != NET_IPV6_NEXTHDR_HBHO) {
+				goto bad_hdr;
+			}
+
 			/* Hop by hop option */
 			if (net_nbuf_ext_bitmap(buf) &
 			    NET_IPV6_EXT_HDR_BITMAP_HBHO) {
 				goto bad_hdr;
 			}
-			/* HBH option needs to be the first one */
-			if (first_option != NET_IPV6_NEXTHDR_HBHO) {
-				goto bad_hdr;
-			}

 			net_nbuf_add_ext_bitmap(buf,
 						NET_IPV6_EXT_HDR_BITMAP_HBHO);
@@ -307,51 +304,35 @@
 			frag = handle_ext_hdr_options(buf, frag, real_len,
 						      length, offset, &offset,
 						      &verdict);
-			if (verdict == NET_DROP) {
-				goto drop;
-			} else if (verdict == NET_CONTINUE) {
-				/* ignore the option */
-				break;
-			}
-
-			if (!frag && offset) {
-				/* Header issue, the ICMPv6 parameter problem
-				 * error is already sent so just drop the msg
-				 * here.
-				 */
-				goto drop;
-			}
-
 			break;

-		/* The next header after the extensions can be also
-		 * one of the main protocols.
-		 */
-		case IPPROTO_ICMPV6:
-			net_nbuf_set_ext_len(buf,
-					     offset -
-					     sizeof(struct net_ipv6_hdr));
-			return process_icmpv6_pkt(buf, hdr);
-
-#if defined(CONFIG_NET_UDP)
-		case IPPROTO_UDP:
-			net_nbuf_set_ext_len(buf,
-					     offset -
-					     sizeof(struct net_ipv6_hdr));
-			return net_conn_input(IPPROTO_UDP, buf);
-#endif
-#if defined(CONFIG_NET_TCP)
-		case IPPROTO_TCP:
-			net_nbuf_set_ext_len(buf,
-					     offset -
-					     sizeof(struct net_ipv6_hdr));
-			return net_conn_input(IPPROTO_TCP, buf);
-#endif
 		default:
 			goto bad_hdr;
 		}

+		if (verdict == NET_DROP) {
+			goto drop;
+		}
+
 		next = next_hdr;
+	}
+
+upper_proto:
+	switch (next) {
+	case IPPROTO_ICMPV6:
+		return process_icmpv6_pkt(buf, hdr);
+	case IPPROTO_UDP:
+#if defined(CONFIG_NET_UDP)
+		return net_conn_input(IPPROTO_UDP, buf);
+#else
+		return NET_DROP;
+#endif
+	case IPPROTO_TCP:
+#if defined(CONFIG_NET_TCP)
+		return net_conn_input(IPPROTO_TCP, buf);
+#else
+		return NET_DROP;
+#endif
 	}

 drop:


Fixups for TDM GCC 4.5.0.

Fixups for TDM GCC 4.5.0.

--- OOps/disprep.c
+++ OOps/disprep.c
@@ -53,11 +53,12 @@
 int fdspset(CSOUND *csound, FSIGDISP *p){
     char strmsg[256];
     p->size = p->fin->N/2 + 1;
-    if (*p->points && (p->size > *p->points)) p->size = *p->points;
-
-  if (p->fdata.auxp == NULL || p->fdata.size < p->size*sizeof(MYFLT))
+    if ((*p->points != (MYFLT) 0) && (p->size > (int) *p->points)) {
+      p->size = *p->points;
+    }
+    if ((p->fdata.auxp == NULL) || (p->fdata.size < (int) (p->size*sizeof(MYFLT)))) {
       csound->AuxAlloc(csound, p->size*sizeof(MYFLT), &p->fdata);
-
+    }
     sprintf(strmsg, Str("instr %d, pvs-signal %s:"),
       (int) p->h.insdshead->p1, p->h.optext->t.inlist->arg[0]);
     dispset(csound, &p->dwindow, (MYFLT*) p->fdata.auxp, p->size, strmsg,


Fixed SDL 1.3 compilation

Fixed SDL 1.3 compilation

--- project/sdl/sdl-1.3/src/video/android/SDL_androidinput.c
+++ project/sdl/sdl-1.3/src/video/android/SDL_androidinput.c
@@ -31,6 +31,7 @@

 #include "SDL_version.h"

+#include "../SDL_sysvideo.h"
 #include "SDL_androidvideo.h"
 #include "SDL_androidinput.h"
 #include "jniwrapperstuff.h"


tests: add unit test for jpeg depayloader packet loss handling

Make sure it always outputs something that looks like a valid
JPEG frame, ie. starts with an SOI marker and ends with an EOI
marker.

--- tests/check/elements/rtp-payloading.c
+++ tests/check/elements/rtp-payloading.c
@@ -18,6 +18,7 @@
  * Boston, MA 02110-1301, USA.
  */
 #include <gst/check/gstcheck.h>
+#include <gst/check/gstharness.h>
 #include <stdlib.h>
 #include <unistd.h>

@@ -1049,6 +1050,73 @@

 GST_END_TEST;

+static void
+rtp_jpeg_do_packet_loss (gdouble prob, gint num_expected)
+{
+  GstHarness *h;
+  gboolean eos = FALSE;
+  gchar *s;
+  guint i, buffer_count;
+
+  s = g_strdup_printf ("videotestsrc pattern=ball num-buffers=100 ! "
+      "jpegenc quality=50 ! rtpjpegpay ! identity drop-probability=%g ! "
+      "rtpjpegdepay", prob);
+  GST_INFO ("running pipeline %s", s);
+  h = gst_harness_new_parse (s);
+  g_free (s);
+
+  gst_harness_play (h);
+
+  do {
+    GstEvent *event;
+
+    event = gst_harness_pull_event (h);
+    eos = (GST_EVENT_TYPE (event) == GST_EVENT_EOS);
+    gst_event_unref (event);
+  } while (!eos);
+
+  buffer_count = gst_harness_buffers_received (h);
+  GST_INFO ("Got %u buffers", buffer_count);
+
+  if (num_expected >= 0) {
+    fail_unless_equals_int (num_expected, buffer_count);
+  }
+
+  for (i = 0; i < buffer_count; ++i) {
+    GstBuffer *buf;
+    GstMapInfo map;
+    guint16 soi, eoi;
+
+    buf = gst_harness_pull (h);
+    fail_unless (buf != NULL);
+
+    fail_unless (gst_buffer_map (buf, &map, GST_MAP_READ));
+    GST_MEMDUMP ("jpeg frame", map.data, map.size);
+    fail_unless (map.size > 4);
+    soi = GST_READ_UINT16_BE (map.data);
+    fail_unless (soi == 0xffd8, "expected JPEG frame start FFD8 not %02X", soi);
+    eoi = GST_READ_UINT16_BE (map.data + map.size - 2);
+    fail_unless (eoi == 0xffd9, "expected JPEG frame end FFD9 not %02X", eoi);
+    gst_buffer_unmap (buf, &map);
+    gst_buffer_unref (buf);
+  }
+
+  gst_harness_teardown (h);
+}
+
+GST_START_TEST (rtp_jpeg_packet_loss)
+{
+  gdouble probabilities[] = { 0.0, 0.001, 0.01, 0.1, 0.2, 0.5, 1.0 };
+  gint num_expected[] = { 100, -1, -1, -1, -1, -1, 0 };
+
+  GST_INFO ("Start iteration %d", __i__);
+  fail_unless (__i__ < G_N_ELEMENTS (probabilities));
+  rtp_jpeg_do_packet_loss (probabilities[__i__], num_expected[__i__]);
+  GST_INFO ("Done with iteration %d", __i__);
+}
+
+GST_END_TEST;
+
 static const guint8 rtp_g729_frame_data[] =
     { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
@@ -1109,6 +1177,7 @@
 static Suite *
 rtp_payloading_suite (void)
 {
+  GstRegistry *registry = gst_registry_get ();
   Suite *s = suite_create ("rtp_data_test");

   TCase *tc_chain = tcase_create ("linear");
@@ -1149,6 +1218,9 @@
   tcase_add_test (tc_chain, rtp_jpeg_list_width_greater_than_2040);
   tcase_add_test (tc_chain, rtp_jpeg_list_height_greater_than_2040);
   tcase_add_test (tc_chain, rtp_jpeg_list_width_and_height_greater_than_2040);
+  if (gst_registry_check_feature_version (registry, "jpegenc", 1, 0, 0)
+      && gst_registry_check_feature_version (registry, "videotestsrc", 1, 0, 0))
+    tcase_add_loop_test (tc_chain, rtp_jpeg_packet_loss, 0, 7);
   tcase_add_test (tc_chain, rtp_g729);
   tcase_add_test (tc_chain, rtp_gst_custom_event);
   return s;


Adding few data structures

Adding few data structures

--- src/bwtree.h
+++ src/bwtree.h
@@ -184,8 +184,40 @@
  * class BwTreeBase - Base class of BwTree that stores some common members
  */
 class BwTreeBase {
+  // This is the presumed size of cache line
+  static constexpr CACHE_LINE_SIZE = 64;
+
+  /*
+   * class Data - Actual cache line data
+   */
+  class Data {
+   public:
+    uint64_t counter;
+  };
+
+  // Make sure class Data does not exceed one cache line
+  static_assert(sizeof(Data) < CACHE_LINE_SIZE);
+
+  /*
+   * class PaddedData - Padded data to the length of a cache line
+   */
+  class PaddedData {
+    // This is the alignment of padded data - we adjust its alignment
+    // after malloc() a chunk of memory
+    static constexpr size_t ALIGNMENT = 64UL;
+   public:
+    Data data;
+   private:
+    char padding[alignment - sizeof(Data)];
+  };
+
+  static_assert(sizeof(PaddedData) == PaddedData::ALIGNMENT);
+
+  // This is used as the garbage collection ID, and is maintained in a per
+  // thread level
+  static thread_local gc_id;
  private:
-
+
  public:
 };

@@ -239,7 +271,7 @@
           typename KeyHashFunc = std::hash<KeyType>,
           typename ValueEqualityChecker = std::equal_to<ValueType>,
           typename ValueHashFunc = std::hash<ValueType>>
-class BwTree {
+class BwTree : public BwTreeBase {
  /*
   * Private & Public declaration
   */


Fix: make size in ret_val and for loop variable same across a tc

Signed-off-by: Lokesh B V <a10c1c2561c872cd1fd5899c4340d5ec87a91507@partner.samsung.com>

--- apps/examples/testcase/le_tc/kernel/tc_libc_math.c
+++ apps/examples/testcase/le_tc/kernel/tc_libc_math.c
@@ -186,7 +186,7 @@

 	/* Returns the nonnegative area hyperbolic cosine of x */

-	for (acosl_idx = 0; acosl_idx < SIZE(in_val, long double); acosl_idx++) {
+	for (acosl_idx = 0; acosl_idx < SIZE(sol_val, long double); acosl_idx++) {
 		ret_val[acosl_idx] = acosl(in_val[acosl_idx]);
 		TC_ASSERT_LEQ("acosl", fabsl(sol_val[acosl_idx] - ret_val[acosl_idx]), FLT_EPSILON);
 	}
@@ -212,7 +212,7 @@

 	/* Returns the principal value of the arc sine of x */

-	for (asin_idx = 0; asin_idx < SIZE(in_val, double); asin_idx++) {
+	for (asin_idx = 0; asin_idx < SIZE(sol_val, double); asin_idx++) {
 		ret_val[asin_idx] = asin(in_val[asin_idx]);
 		TC_ASSERT_LEQ("asin", fabs(sol_val[asin_idx] - ret_val[asin_idx]), FLT_EPSILON);
 	}
@@ -238,7 +238,7 @@

 	/* Returns the principal value of the arc sine of x */

-	for (asinf_idx = 0; asinf_idx < SIZE(in_val, float); asinf_idx++) {
+	for (asinf_idx = 0; asinf_idx < SIZE(sol_val, float); asinf_idx++) {
 		ret_val[asinf_idx] = asinf(in_val[asinf_idx]);
 		TC_ASSERT_LEQ("asinf", fabsf(sol_val[asinf_idx] - ret_val[asinf_idx]), FLT_EPSILON);
 	}
@@ -264,7 +264,7 @@

 	/* Returns the area hyperbolic sine of x */

-	for (asinh_idx = 0; asinh_idx < SIZE(in_val, double); asinh_idx++) {
+	for (asinh_idx = 0; asinh_idx < SIZE(sol_val, double); asinh_idx++) {
 		ret_val[asinh_idx] = asinh(in_val[asinh_idx]);
 		TC_ASSERT_LEQ("asinh", fabs(sol_val[asinh_idx] - ret_val[asinh_idx]), FLT_EPSILON);
 	}
@@ -290,7 +290,7 @@

 	/* Returns the area hyperbolic sine of x */

-	for (asinhf_idx = 0; asinhf_idx < SIZE(in_val, float); asinhf_idx++) {
+	for (asinhf_idx = 0; asinhf_idx < SIZE(sol_val, float); asinhf_idx++) {
 		ret_val[asinhf_idx] = asinhf(in_val[asinhf_idx]);
 		TC_ASSERT_LEQ("asinhf", fabsf(sol_val[asinhf_idx] - ret_val[asinhf_idx]), FLT_EPSILON);
 	}
@@ -316,7 +316,7 @@

 	/* Returns the area hyperbolic sine of x */

-	for (asinhl_idx = 0; asinhl_idx < SIZE(in_val, long double); asinhl_idx++) {
+	for (asinhl_idx = 0; asinhl_idx < SIZE(sol_val, long double); asinhl_idx++) {
 		ret_val[asinhl_idx] = asinhl(in_val[asinhl_idx]);
 		TC_ASSERT_LEQ("asinhl", fabsl(sol_val[asinhl_idx] - ret_val[asinhl_idx]), FLT_EPSILON);
 	}
@@ -342,7 +342,7 @@

 	/* Returns the principal value of the arc sine of x */

-	for (asinl_idx = 0; asinl_idx < SIZE(in_val, long double); asinl_idx++) {
+	for (asinl_idx = 0; asinl_idx < SIZE(sol_val, long double); asinl_idx++) {
 		ret_val[asinl_idx] = asinl(in_val[asinl_idx]);
 		TC_ASSERT_LEQ("asinl", fabsl(sol_val[asinl_idx] - ret_val[asinl_idx]), FLT_EPSILON);
 	}
@@ -368,7 +368,7 @@

 	/* Returns the principal value of the arc tangent of x */

-	for (atan_idx = 0; atan_idx < SIZE(in_val, double); atan_idx++) {
+	for (atan_idx = 0; atan_idx < SIZE(sol_val, double); atan_idx++) {
 		ret_val[atan_idx] = atan(in_val[atan_idx]);
 		TC_ASSERT_LEQ("atan", fabs(sol_val[atan_idx] - ret_val[atan_idx]), FLT_EPSILON);
 	}
@@ -394,7 +394,7 @@

 	/* Returns the principal value of the arc tangent of x */

-	for (atanf_idx = 0; atanf_idx < SIZE(in_val, float); atanf_idx++) {
+	for (atanf_idx = 0; atanf_idx < SIZE(sol_val, float); atanf_idx++) {
 		ret_val[atanf_idx] = atanf(in_val[atanf_idx]);
 		TC_ASSERT_LEQ("atanf", fabsf(sol_val[atanf_idx] - ret_val[atanf_idx]), FLT_EPSILON);
 	}
@@ -420,7 +420,7 @@

 	/* Returns the area hyperbolic tangent of x */

-	for (atanh_idx = 0; atanh_idx < SIZE(in_val, double); atanh_idx++) {
+	for (atanh_idx = 0; atanh_idx < SIZE(sol_val, double); atanh_idx++) {
 		ret_val[atanh_idx] = atanh(in_val[atanh_idx]);
 		TC_ASSERT_LEQ("atanh", fabs(sol_val[atanh_idx] - ret_val[atanh_idx]), FLT_EPSILON);
 	}
@@ -446,7 +446,7 @@

 	/* Returns the area hyperbolic tangent of x */

-	for (atanhf_idx = 0; atanhf_idx < SIZE(in_val, float); atanhf_idx++) {
+	for (atanhf_idx = 0; atanhf_idx < SIZE(sol_val, float); atanhf_idx++) {
 		ret_val[atanhf_idx] = atanhf(in_val[atanhf_idx]);
 		TC_ASSERT_LEQ("atanhf", fabsf(sol_val[atanhf_idx] - ret_val[atanhf_idx]), FLT_EPSILON);
 	}
@@ -472,7 +472,7 @@

 	/* Returns the area hyperbolic tangent of x */

-	for (atanhl_idx = 0; atanhl_idx < SIZE(in_val, long double); atanhl_idx++) {
+	for (atanhl_idx = 0; atanhl_idx < SIZE(sol_val, long double); atanhl_idx++) {
 		ret_val[atanhl_idx] = atanhl(in_val[atanhl_idx]);
 		TC_ASSERT_LEQ("atanhl", fabsl(sol_val[atanhl_idx] - ret_val[atanhl_idx]), FLT_EPSILON);
 	}
@@ -498,7 +498,7 @@

 	/* Returns the principal value of the arc tangent of x */

-	for (atanl_idx = 0; atanl_idx < SIZE(in_val, long double); atanl_idx++) {
+	for (atanl_idx = 0; atanl_idx < SIZE(sol_val, long double); atanl_idx++) {
 		ret_val[atanl_idx] = atanl(in_val[atanl_idx]);
 		TC_ASSERT_LEQ("atanl", fabsl(sol_val[atanl_idx] - ret_val[atanl_idx]), FLT_EPSILON);
 	}
@@ -603,7 +603,7 @@
 	double ret_val[SIZE(sol_val, double)];
 	int cbrt_idx;

-	for (cbrt_idx = 0; cbrt_idx < SIZE(in_val, double); cbrt_idx++) {
+	for (cbrt_idx = 0; cbrt_idx < SIZE(sol_val, double); cbrt_idx++) {
 		ret_val[cbrt_idx] = cbrt(in_val[cbrt_idx]);
 		if (!(isnan(sol_val[cbrt_idx]) && isnan(ret_val[cbrt_idx]))) {
 			TC_ASSERT_LEQ("cbrt", fabs(sol_val[cbrt_idx] - ret_val[cbrt_idx]), FLT_EPSILON);
@@ -629,7 +629,7 @@
 	float ret_val[SIZE(sol_val, float)];
 	int cbrtf_idx;

-	for (cbrtf_idx = 0; cbrtf_idx < SIZE(in_val, float); cbrtf_idx++) {
+	for (cbrtf_idx = 0; cbrtf_idx < SIZE(sol_val, float); cbrtf_idx++) {
 		ret_val[cbrtf_idx] = cbrtf(in_val[cbrtf_idx]);
 		if (!(isnan(sol_val[cbrtf_idx]) && isnan(ret_val[cbrtf_idx]))) {
 			TC_ASSERT_LEQ("cbrtf", fabsf((float)sol_val[cbrtf_idx] - ret_val[cbrtf_idx]), FLT_EPSILON);
@@ -655,7 +655,7 @@
 	long double ret_val[SIZE(sol_val, long double)];
 	int cbrtl_idx;

-	for (cbrtl_idx = 0; cbrtl_idx < SIZE(in_val, long double); cbrtl_idx++) {
+	for (cbrtl_idx = 0; cbrtl_idx < SIZE(sol_val, long double); cbrtl_idx++) {
 		ret_val[cbrtl_idx] = cbrtl(in_val[cbrtl_idx]);
 		if (!(isnan(sol_val[cbrtl_idx]) && isnan(ret_val[cbrtl_idx]))) {
 			TC_ASSERT_LEQ("cbrtl", fabsl(sol_val[cbrtl_idx] - ret_val[cbrtl_idx]), FLT_EPSILON);
@@ -683,7 +683,7 @@

 	/* Rounds x upward, returning the smallest integral value that is not less than x */

-	for (ceil_idx = 0; ceil_idx < SIZE(in_val, long double); ceil_idx++) {
+	for (ceil_idx = 0; ceil_idx < SIZE(sol_val, long double); ceil_idx++) {
 		ret_val[ceil_idx] = ceil(in_val[ceil_idx]);
 		TC_ASSERT_LEQ("ceil", fabs(sol_val[ceil_idx] - ret_val[ceil_idx]), FLT_EPSILON);
 	}
@@ -709,7 +709,7 @@

 	/* Rounds x upward, returning the smallest integral value that is not less than x */

-	for (ceilf_idx = 0; ceilf_idx < SIZE(in_val, float); ceilf_idx++) {
+	for (ceilf_idx = 0; ceilf_idx < SIZE(sol_val, float); ceilf_idx++) {
 		ret_val[ceilf_idx] = ceilf(in_val[ceilf_idx]);
 		TC_ASSERT_LEQ("ceilf", fabsf(sol_val[ceilf_idx] - ret_val[ceilf_idx]), FLT_EPSILON);
 	}
@@ -735,7 +735,7 @@

 	/* Rounds x upward, returning the smallest integral value that is not less than x */

-	for (ceill_idx = 0; ceill_idx < SIZE(in_val, long double); ceill_idx++) {
+	for (ceill_idx = 0; ceill_idx < SIZE(sol_val, long double); ceill_idx++) {
 		ret_val[ceill_idx] = ceill(in_val[ceill_idx]);
 		TC_ASSERT_LEQ("ceill", fabsl(sol_val[ceill_idx] - ret_val[ceill_idx]), FLT_EPSILON);
 	}
@@ -842,7 +842,7 @@

 	/* Returns the cosine of an angle of x radians */

-	for (cos_idx = 0; cos_idx < SIZE(in_val, double); cos_idx++) {
+	for (cos_idx = 0; cos_idx < SIZE(sol_val, double); cos_idx++) {
 		ret_val[cos_idx] = cos(in_val[cos_idx]);
 		TC_ASSERT_LEQ("cos", fabs(sol_val[cos_idx] - ret_val[cos_idx]), FLT_EPSILON);
 	}
@@ -868,7 +868,7 @@

 	/* Returns the cosine of an angle of x radians */

-	for (cosf_idx = 0; cosf_idx < SIZE(in_val, float); cosf_idx++) {
+	for (cosf_idx = 0; cosf_idx < SIZE(sol_val, float); cosf_idx++) {
 		ret_val[cosf_idx] = cosf(in_val[cosf_idx]);
 		TC_ASSERT_LEQ("cosf", fabsf(sol_val[cosf_idx] - ret_val[cosf_idx]), FLT_EPSILON);
 	}
@@ -894,7 +894,7 @@

 	/* Returns the hyperbolic cosine of x */

-	for (cosh_idx = 0; cosh_idx < SIZE(in_val, double); cosh_idx++) {
+	for (cosh_idx = 0; cosh_idx < SIZE(sol_val, double); cosh_idx++) {
 		ret_val[cosh_idx] = cosh(in_val[cosh_idx]);
 		TC_ASSERT_LEQ("cosh", fabs(sol_val[cosh_idx] - ret_val[cosh_idx]), FLT_EPSILON);
 	}
@@ -920,7 +920,7 @@

 	/* Returns the hyperbolic cosine of x */

-	for (coshf_idx = 0; coshf_idx < SIZE(in_val, float); coshf_idx++) {
+	for (coshf_idx = 0; coshf_idx < SIZE(sol_val, float); coshf_idx++) {
 		ret_val[coshf_idx] = coshf(in_val[coshf_idx]);
 		TC_ASSERT_LEQ("coshf", fabsf(sol_val[coshf_idx] - ret_val[coshf_idx]), FLT_EPSILON);
 	}
@@ -946,7 +946,7 @@

 	/* Returns the hyperbolic cosine of x */

-	for (coshl_idx = 0; coshl_idx < SIZE(in_val, long double); coshl_idx++) {
+	for (coshl_idx = 0; coshl_idx < SIZE(sol_val, long double); coshl_idx++) {
 		ret_val[coshl_idx] = coshl(in_val[coshl_idx]);
 		TC_ASSERT_LEQ("coshl", fabsl(sol_val[coshl_idx] - ret_val[coshl_idx]), FLT_EPSILON);
 	}
@@ -972,7 +972,7 @@

 	/* Returns the cosine of an angle of x radians */

-	for (cosl_idx = 0; cosl_idx < SIZE(in_val, long double); cosl_idx++) {
+	for (cosl_idx = 0; cosl_idx < SIZE(sol_val, long double); cosl_idx++) {
 		ret_val[cosl_idx] = cosl(in_val[cosl_idx]);
 		TC_ASSERT_LEQ("cosl", fabsl(sol_val[cosl_idx] - ret_val[cosl_idx]), FLT_EPSILON);
 	}
@@ -998,7 +998,7 @@

 	/* Returns the error function value for x */

-	for (erf_idx = 0; erf_idx < SIZE(in_val, double); erf_idx++) {
+	for (erf_idx = 0; erf_idx < SIZE(sol_val, double); erf_idx++) {
 		ret_val[erf_idx] = erf(in_val[erf_idx]);
 		TC_ASSERT_LEQ("erf", fabs(sol_val[erf_idx] - ret_val[erf_idx]), FLT_EPSILON);
 	}
@@ -1024,7 +1024,7 @@

 	/* Returns the error function value for x */

-	for (erff_idx = 0; erff_idx < SIZE(in_val, float); erff_idx++) {
+	for (erff_idx = 0; erff_idx < SIZE(sol_val, float); erff_idx++) {
 		ret_val[erff_idx] = erff(in_val[erff_idx]);
 		TC_ASSERT_LEQ("erff", fabsf(sol_val[erff_idx] - ret_val[erff_idx]), FLT_EPSILON);
 	}
@@ -1050,7 +1050,7 @@

 	/* Returns the error function value for x */

-	for (erfl_idx = 0; erfl_idx < SIZE(in_val, long double); erfl_idx++) {
+	for (erfl_idx = 0; erfl_idx < SIZE(sol_val, long double); erfl_idx++) {
 		ret_val[erfl_idx] = erfl(in_val[erfl_idx]);
 		TC_ASSERT_LEQ("erfl", fabsl(sol_val[erfl_idx] - ret_val[erfl_idx]), FLT_EPSILON);
 	}
@@ -1074,7 +1074,7 @@
 	double ret_val[SIZE(sol_val, double)];
 	int exp_idx;

-	for (exp_idx = 0; exp_idx < SIZE(in_val, double); exp_idx++) {
+	for (exp_idx = 0; exp_idx < SIZE(sol_val, double); exp_idx++) {
 		ret_val[exp_idx] = exp(in_val[exp_idx]);
 		if (!(isnan(sol_val[exp_idx]) && isnan(ret_val[exp_idx]))) {
 			TC_ASSERT_LEQ("exp", fabs(sol_val[exp_idx] - ret_val[exp_idx]), FLT_EPSILON);
@@ -1100,7 +1100,7 @@
 	float ret_val[SIZE(sol_val, float)];
 	int expf_idx;

-	for (expf_idx = 0; expf_idx < SIZE(in_val, float); expf_idx++) {
+	for (expf_idx = 0; expf_idx < SIZE(sol_val, float); expf_idx++) {
 		ret_val[expf_idx] = expf(in_val[expf_idx]);
 		if (!(isnan(sol_val[expf_idx]) && isnan(ret_val[expf_idx]))) {
 			TC_ASSERT_LEQ("expf", fabsf(sol_val[expf_idx] - ret_val[expf_idx]), FLT_EPSILON);
@@ -1126,7 +1126,7 @@
 	long double ret_val[SIZE(sol_val, long double)];
 	int expl_idx;

-	for (expl_idx = 0; expl_idx < SIZE(in_val, long double); expl_idx++) {
+	for (expl_idx = 0; expl_idx < SIZE(sol_val, long double); expl_idx++) {
 		ret_val[expl_idx] = expl(in_val[expl_idx]);
 		if (!(isnan(sol_val[expl_idx]) && isnan(ret_val[expl_idx]))) {
 			TC_ASSERT_LEQ("expl", fabsl(sol_val[expl_idx] - ret_val[expl_idx]), FLT_EPSILON);
@@ -1152,7 +1152,7 @@
 	double ret_val[SIZE(sol_val, double)];
 	int exp2_idx;

-	for (exp2_idx = 0; exp2_idx < SIZE(in_val, double); exp2_idx++) {
+	for (exp2_idx = 0; exp2_idx < SIZE(sol_val, double); exp2_idx++) {
 		ret_val[exp2_idx] = exp2(in_val[exp2_idx]);
 		if (!(isnan(sol_val[exp2_idx]) && isnan(ret_val[exp2_idx]))) {
 			TC_ASSERT_LEQ("exp2", fabs(sol_val[exp2_idx] - ret_val[exp2_idx]), FLT_EPSILON);
@@ -1178,7 +1178,7 @@
 	float ret_val[SIZE(sol_val, float)];
 	int exp2f_idx;

-	for (exp2f_idx = 0; exp2f_idx < SIZE(in_val, float); exp2f_idx++) {
+	for (exp2f_idx = 0; exp2f_idx < SIZE(sol_val, float); exp2f_idx++) {
 		ret_val[exp2f_idx] = exp2f(in_val[exp2f_idx]);
 		if (!(isnan(sol_val[exp2f_idx]) && isnan(ret_val[exp2f_idx]))) {
 			TC_ASSERT_LEQ("exp2f", fabsf(sol_val[exp2f_idx] - ret_val[exp2f_idx]), FLT_EPSILON);
@@ -1204,7 +1204,7 @@
 	long double ret_val[SIZE(sol_val, long double)];
 	int exp2l_idx;

-	for (exp2l_idx = 0; exp2l_idx < SIZE(in_val, long double); exp2l_idx++) {
+	for (exp2l_idx = 0; exp2l_idx < SIZE(sol_val, long double); exp2l_idx++) {
 		ret_val[exp2l_idx] = exp2l(in_val[exp2l_idx]);
 		if (!(isnan(sol_val[exp2l_idx]) && isnan(ret_val[exp2l_idx]))) {
 			TC_ASSERT_LEQ("exp2l", fabsl(sol_val[exp2l_idx] - ret_val[exp2l_idx]), FLT_EPSILON);
@@ -1230,7 +1230,7 @@
 	double ret_val[SIZE(sol_val, double)];
 	int fabs_idx;

-	for (fabs_idx = 0; fabs_idx < SIZE(in_val, double); fabs_idx++) {
+	for (fabs_idx = 0; fabs_idx < SIZE(sol_val, double); fabs_idx++) {
 		ret_val[fabs_idx] = fabs(in_val[fabs_idx]);
 		if (!(isnan(sol_val[fabs_idx]) && isnan(ret_val[fabs_idx]))) {
 			TC_ASSERT_EQ("fabs", sol_val[fabs_idx], ret_val[fabs_idx]);
@@ -1255,7 +1255,7 @@
 	const float sol_val[] = { ZERO, ZERO, 2251799813685248.5, 2251799813685248.5, INFINITY, INFINITY, NAN };
 	float ret_val[SIZE(sol_val, float)];
 	int fabsf_idx;
-	for (fabsf_idx = 0; fabsf_idx < SIZE(in_val, float); fabsf_idx++) {
+	for (fabsf_idx = 0; fabsf_idx < SIZE(sol_val, float); fabsf_idx++) {
 		ret_val[fabsf_idx] = fabsf(in_val[fabsf_idx]);
 		if (!(isnan(sol_val[fabsf_idx]) && isnan(ret_val[fabsf_idx]))) {
 			TC_ASSERT_EQ("fabsf", sol_val[fabsf_idx], ret_val[fabsf_idx]);
@@ -1280,7 +1280,7 @@
 	const long double sol_val[] = { ZERO, ZERO, 2251799813685248.5, 2251799813685248.5, INFINITY, INFINITY, NAN };
 	long double ret_val[SIZE(sol_val, long double)];
 	int fabsl_idx;
-	for (fabsl_idx = 0; fabsl_idx < SIZE(in_val, long double); fabsl_idx++) {
+	for (fabsl_idx = 0; fabsl_idx < SIZE(sol_val, long double); fabsl_idx++) {
 		ret_val[fabsl_idx] = fabsl(in_val[fabsl_idx]);
 		if (!(isnan(sol_val[fabsl_idx]) && isnan(ret_val[fabsl_idx]))) {
 			TC_ASSERT_EQ("fabsl", sol_val[fabsl_idx], ret_val[fabsl_idx]);
@@ -1387,7 +1387,7 @@
 	double ret_val[SIZE(sol_val, double)] = { ZERO };
 	int floor_idx;

-	for (floor_idx = 0; floor_idx < SIZE(in_val, double); floor_idx++) {
+	for (floor_idx = 0; floor_idx < SIZE(sol_val, double); floor_idx++) {
 		ret_val[floor_idx] = floor(in_val[floor_idx]);
 		if (!(isnan(sol_val[floor_idx]) && isnan(ret_val[floor_idx]))) {
 			TC_ASSERT_EQ("floor", sol_val[floor_idx], ret_val[floor_idx]);
@@ -1413,7 +1413,7 @@
 	float ret_val[SIZE(sol_val, float)] = { ZERO };
 	int floorf_idx;

-	for (floorf_idx = 0; floorf_idx < SIZE(in_val, float); floorf_idx++) {
+	for (floorf_idx = 0; floorf_idx < SIZE(sol_val, float); floorf_idx++) {
 		ret_val[floorf_idx] = floorf(in_val[floorf_idx]);
 		if (!(isnan(sol_val[floorf_idx]) && isnan(ret_val[floorf_idx]))) {
 			TC_ASSERT_EQ("floorf", sol_val[floorf_idx], ret_val[floorf_idx]);
@@ -1438,7 +1438,7 @@
 	const long double sol_val[] = { ZERO, -ZERO, 2251799813685248.0, -2251799813685249.0, 4503599627370496.0, -4503599627370497.0, INFINITY, -INFINITY };
 	long double ret_val[SIZE(sol_val, long double)] = { ZERO };
 	int floorl_idx;
-	for (floorl_idx = 0; floorl_idx < SIZE(in_val, long double); floorl_idx++) {
+	for (floorl_idx = 0; floorl_idx < SIZE(sol_val, long double); floorl_idx++) {
 		ret_val[floorl_idx] = floorl(in_val[floorl_idx]);
 		if (!(isnan(sol_val[floorl_idx]) && isnan(ret_val[floorl_idx]))) {
 			TC_ASSERT_EQ("floorl", sol_val[floorl_idx], ret_val[floorl_idx]);
@@ -1625,12 +1625,12 @@
 	const double sol_val[] = { 0.5, 0.575, -10 };
 	const double n_val[] = { 4, 2, 0 };
 	double ret_val[SIZE(sol_val, double)];
-	int n[SIZE(in_val, double)];
+	int n[SIZE(sol_val, double)];
 	int frexp_idx;

 	/* Breaks the floating point number x into its binary significand and an integral exponent for 2 */

-	for (frexp_idx = 0; frexp_idx < SIZE(in_val, double); frexp_idx++) {
+	for (frexp_idx = 0; frexp_idx < SIZE(sol_val, double); frexp_idx++) {
 		ret_val[frexp_idx] = frexp(in_val[frexp_idx], &n[frexp_idx]);
 		TC_ASSERT_LEQ("frexp", fabs(sol_val[frexp_idx] - ret_val[frexp_idx]), FLT_EPSILON);
 		TC_ASSERT_LEQ("frexp", fabs(n[frexp_idx] - n_val[frexp_idx]), FLT_EPSILON);
@@ -1654,12 +1654,12 @@
 	const float sol_val[] = { 1, 0.575, 0 };
 	const float n_val[] = { 3, 2, 2147483647 };
 	float ret_val[SIZE(sol_val, float)];
-	int n[SIZE(in_val, float)];
+	int n[SIZE(sol_val, float)];
 	int frexpf_idx;

 	/* Breaks the floating point number x into its binary significand and an integral exponent for 2 */

-	for (frexpf_idx = 0; frexpf_idx < SIZE(in_val, float); frexpf_idx++) {
+	for (frexpf_idx = 0; frexpf_idx < SIZE(sol_val, float); frexpf_idx++) {
 		ret_val[frexpf_idx] = frexpf(in_val[frexpf_idx], &n[frexpf_idx]);
 		TC_ASSERT_LEQ("frexp", fabsf(sol_val[frexpf_idx] - ret_val[frexpf_idx]), FLT_EPSILON);
 		TC_ASSERT_LEQ("frexp", fabsf(n[frexpf_idx] - n_val[frexpf_idx]), FLT_EPSILON);
@@ -1683,12 +1683,12 @@
 	const long double sol_val[] = { 0.5, 0.575, -10 };
 	const long double n_val[] = { 4, 2, 0 };
 	long double ret_val[SIZE(sol_val, long double)];
-	int n[SIZE(in_val, long double)];
+	int n[SIZE(sol_val, long double)];
 	int frexpl_idx;

 	/* Breaks the floating point number x into its binary significand and an integral exponent for 2 */

-	for (frexpl_idx = 0; frexpl_idx < SIZE(in_val, long double); frexpl_idx++) {
+	for (frexpl_idx = 0; frexpl_idx < SIZE(sol_val, long double); frexpl_idx++) {
 		ret_val[frexpl_idx] = frexpl(in_val[frexpl_idx], &n[frexpl_idx]);
 		TC_ASSERT_LEQ("frexp", fabsl(sol_val[frexpl_idx] - ret_val[frexpl_idx]), FLT_EPSILON);
 		TC_ASSERT_LEQ("frexp", fabsl(n[frexpl_idx] - n_val[frexpl_idx]), FLT_EPSILON);
@@ -1798,7 +1798,7 @@
 	double ret_val[SIZE(sol_val, double)] = { ZERO };
 	int j0_idx;

-	for (j0_idx = 0; j0_idx < SIZE(in_val, double); j0_idx++) {
+	for (j0_idx = 0; j0_idx < SIZE(sol_val, double); j0_idx++) {
 		ret_val[j0_idx] = j0(in_val[j0_idx]);
 		if (!(isnan(sol_val[j0_idx]) && isnan(ret_val[j0_idx]))) {
 			TC_ASSERT_LEQ("j0", fabs(sol_val[j0_idx] - ret_val[j0_idx]), FLT_EPSILON);
@@ -1824,7 +1824,7 @@
 	float ret_val[SIZE(sol_val, float)] = { ZERO };
 	int j0f_idx;

-	for (j0f_idx = 0; j0f_idx < SIZE(in_val, float); j0f_idx++) {
+	for (j0f_idx = 0; j0f_idx < SIZE(sol_val, float); j0f_idx++) {
 		ret_val[j0f_idx] = j0f(in_val[j0f_idx]);
 		if (!(isnan(sol_val[j0f_idx]) && isnan(ret_val[j0f_idx]))) {
 			TC_ASSERT_LEQ("j0f", fabsf(sol_val[j0f_idx] - ret_val[j0f_idx]), FLT_EPSILON);
@@ -1850,7 +1850,7 @@
 	double ret_val[SIZE(sol_val, double)] = { ZERO };
 	int j1_idx;

-	for (j1_idx = 0; j1_idx < SIZE(in_val, double); j1_idx++) {
+	for (j1_idx = 0; j1_idx < SIZE(sol_val, double); j1_idx++) {
 		ret_val[j1_idx] = j1(in_val[j1_idx]);
 		if (!(isnan(sol_val[j1_idx]) && isnan(ret_val[j1_idx]))) {
 			TC_ASSERT_LEQ("j1", fabs(sol_val[j1_idx] - ret_val[j1_idx]), FLT_EPSILON);
@@ -1876,7 +1876,7 @@
 	float ret_val[SIZE(sol_val, float)] = { ZERO };
 	int j1f_idx;

-	for (j1f_idx = 0; j1f_idx < SIZE(in_val, float); j1f_idx++) {
+	for (j1f_idx = 0; j1f_idx < SIZE(sol_val, float); j1f_idx++) {
 		ret_val[j1f_idx] = j1f(in_val[j1f_idx]);
 		if (!(isnan(sol_val[j1f_idx]) && isnan(ret_val[j1f_idx]))) {
 			TC_ASSERT_LEQ("j1f", fabsf(sol_val[j1f_idx] - ret_val[j1f_idx]), FLT_EPSILON);
@@ -1964,7 +1964,7 @@

 	/* Breaks the floating point number x into its binary significand and an integral exponent for 2 */

-	for (ldexp_idx = 0; ldexp_idx < SIZE(in_val, double); ldexp_idx++) {
+	for (ldexp_idx = 0; ldexp_idx < SIZE(sol_val, double); ldexp_idx++) {
 		ret_val[ldexp_idx] = ldexp(in_val[ldexp_idx], n[ldexp_idx]);
 		TC_ASSERT_LEQ("ldexp", fabs(sol_val[ldexp_idx] - ret_val[ldexp_idx]), FLT_EPSILON);
 	}
@@ -1991,7 +1991,7 @@

 	/* Breaks the floating point number x into its binary significand and an integral exponent for 2 */

-	for (ldexpf_idx = 0; ldexpf_idx < SIZE(in_val, float); ldexpf_idx++) {
+	for (ldexpf_idx = 0; ldexpf_idx < SIZE(sol_val, float); ldexpf_idx++) {
 		ret_val[ldexpf_idx] = ldexpf(in_val[ldexpf_idx], n[ldexpf_idx]);
 		TC_ASSERT_LEQ("ldexpf", fabsf(sol_val[ldexpf_idx] - ret_val[ldexpf_idx]), FLT_EPSILON);
 	}
@@ -2018,7 +2018,7 @@

 	/* Breaks the floating point number x into its binary significand and an integral exponent for 2 */

-	for (ldexpl_idx = 0; ldexpl_idx < SIZE(in_val, long double); ldexpl_idx++) {
+	for (ldexpl_idx = 0; ldexpl_idx < SIZE(sol_val, long double); ldexpl_idx++) {
 		ret_val[ldexpl_idx] = ldexpl(in_val[ldexpl_idx], n[ldexpl_idx]);
 		TC_ASSERT_LEQ("ldexpl", fabsl(sol_val[ldexpl_idx] - ret_val[ldexpl_idx]), FLT_EPSILON);
 	}
@@ -2044,7 +2044,7 @@

 	/* Returns the binary (base-2) logarithm of x */

-	for (log2_idx = 0; log2_idx < SIZE(in_val, double); log2_idx++) {
+	for (log2_idx = 0; log2_idx < SIZE(sol_val, double); log2_idx++) {
 		ret_val[log2_idx] = log2(in_val[log2_idx]);
 		TC_ASSERT_LEQ("log2", fabs(sol_val[log2_idx] - ret_val[log2_idx]), FLT_EPSILON);
 	}
@@ -2070,7 +2070,7 @@

 	/* Returns the binary (base-2) logarithm of x */

-	for (log2f_idx = 0; log2f_idx < SIZE(in_val, float); log2f_idx++) {
+	for (log2f_idx = 0; log2f_idx < SIZE(sol_val, float); log2f_idx++) {
 		ret_val[log2f_idx] = log2f(in_val[log2f_idx]);
 		TC_ASSERT_LEQ("log2f", fabsf(sol_val[log2f_idx] - ret_val[log2f_idx]), FLT_EPSILON);
 	}
@@ -2096,7 +2096,7 @@

 	/* Returns the binary (base-2) logarithm of x */

-	for (log2l_idx = 0; log2l_idx < SIZE(in_val, long double); log2l_idx++) {
+	for (log2l_idx = 0; log2l_idx < SIZE(sol_val, long double); log2l_idx++) {
 		ret_val[log2l_idx] = log2l(in_val[log2l_idx]);
 		TC_ASSERT_LEQ("log2l", fabsl(sol_val[log2l_idx] - ret_val[log2l_idx]), FLT_EPSILON);
 	}
@@ -2120,7 +2120,7 @@
 	double ret_val[SIZE(sol_val, double)];
 	int log10_idx;

-	for (log10_idx = 0; log10_idx < SIZE(in_val, double); log10_idx++) {
+	for (log10_idx = 0; log10_idx < SIZE(sol_val, double); log10_idx++) {
 		ret_val[log10_idx] = log10(in_val[log10_idx]);
 		TC_ASSERT_LEQ("log10", fabs(sol_val[log10_idx] - ret_val[log10_idx]), FLT_EPSILON);
 	}
@@ -2144,7 +2144,7 @@
 	float ret_val[SIZE(sol_val, float)];
 	int log10f_idx;

-	for (log10f_idx = 0; log10f_idx < SIZE(in_val, float); log10f_idx++) {
+	for (log10f_idx = 0; log10f_idx < SIZE(sol_val, float); log10f_idx++) {
 		ret_val[log10f_idx] = log10f(in_val[log10f_idx]);
 		TC_ASSERT_LEQ("log10f", fabsf(sol_val[log10f_idx] - ret_val[log10f_idx]), FLT_EPSILON);
 	}
@@ -2168,7 +2168,7 @@
 	long double ret_val[SIZE(sol_val, long double)];
 	int log10l_idx;

-	for (log10l_idx = 0; log10l_idx < SIZE(in_val, long double); log10l_idx++) {
+	for (log10l_idx = 0; log10l_idx < SIZE(sol_val, long double); log10l_idx++) {
 		ret_val[log10l_idx] = log10l(in_val[log10l_idx]);
 		TC_ASSERT_LEQ("log10l", fabsl(sol_val[log10l_idx] - ret_val[log10l_idx]), FLT_EPSILON);
 	}
@@ -2561,7 +2561,7 @@
 	double ret_val[SIZE(sol_val, double)];
 	int rint_idx;

-	for (rint_idx = 0; rint_idx < SIZE(in_val, double); rint_idx++) {
+	for (rint_idx = 0; rint_idx < SIZE(sol_val, double); rint_idx++) {
 		ret_val[rint_idx] = rint(in_val[rint_idx]);
 		if (!(isnan(sol_val[rint_idx]) && isnan(ret_val[rint_idx]))) {
 			TC_ASSERT_LEQ("rint", fabs(sol_val[rint_idx] - ret_val[rint_idx]), FLT_EPSILON);
@@ -2587,7 +2587,7 @@
 	float ret_val[SIZE(sol_val, float)];
 	int rintf_idx;

-	for (rintf_idx = 0; rintf_idx < SIZE(in_val, float); rintf_idx++) {
+	for (rintf_idx = 0; rintf_idx < SIZE(sol_val, float); rintf_idx++) {
 		ret_val[rintf_idx] = rintf(in_val[rintf_idx]);
 		if (!(isnan(sol_val[rintf_idx]) && isnan(ret_val[rintf_idx]))) {
 			TC_ASSERT_LEQ("rintf", fabsf(sol_val[rintf_idx] - ret_val[rintf_idx]), FLT_EPSILON);
@@ -2613,7 +2613,7 @@
 	long double ret_val[SIZE(sol_val, long double)];
 	int rintl_idx;

-	for (rintl_idx = 0; rintl_idx < SIZE(in_val, long double); rintl_idx++) {
+	for (rintl_idx = 0; rintl_idx < SIZE(sol_val, long double); rintl_idx++) {
 		ret_val[rintl_idx] = rintl(in_val[rintl_idx]);
 		if (!(isnan(sol_val[rintl_idx]) && isnan(ret_val[rintl_idx]))) {
 			TC_ASSERT_LEQ("rintl", fabsl(sol_val[rintl_idx] - ret_val[rintl_idx]), FLT_EPSILON);
@@ -2639,7 +2639,7 @@
 	double ret_val[SIZE(sol_val, double)];
 	int round_idx;

-	for (round_idx = 0; round_idx < SIZE(in_val, double); round_idx++) {
+	for (round_idx = 0; round_idx < SIZE(sol_val, double); round_idx++) {
 		ret_val[round_idx] = round(in_val[round_idx]);
 		if (!(isnan(sol_val[round_idx]) && isnan(ret_val[round_idx]))) {
 			TC_ASSERT_LEQ("round", fabs(sol_val[round_idx] - ret_val[round_idx]), FLT_EPSILON);
@@ -2665,7 +2665,7 @@
 	float ret_val[SIZE(sol_val, float)];
 	int roundf_idx;

-	for (roundf_idx = 0; roundf_idx < SIZE(in_val, float); roundf_idx++) {
+	for (roundf_idx = 0; roundf_idx < SIZE(sol_val, float); roundf_idx++) {
 		ret_val[roundf_idx] = roundf(in_val[roundf_idx]);
 		if (!(isnan(sol_val[roundf_idx]) && isnan(ret_val[roundf_idx]))) {
 			TC_ASSERT_LEQ("roundf", fabsf(sol_val[roundf_idx] - ret_val[roundf_idx]), FLT_EPSILON);
@@ -2691,7 +2691,7 @@
 	long double ret_val[SIZE(sol_val, long double)];
 	int roundl_idx;

-	for (roundl_idx = 0; roundl_idx < SIZE(in_val, long double); roundl_idx++) {
+	for (roundl_idx = 0; roundl_idx < SIZE(sol_val, long double); roundl_idx++) {
 		ret_val[roundl_idx] = roundl(in_val[roundl_idx]);
 		if (!(isnan(sol_val[roundl_idx]) && isnan(ret_val[roundl_idx]))) {
 			TC_ASSERT_LEQ("roundl", fabsl(sol_val[roundl_idx] - ret_val[roundl_idx]), FLT_EPSILON);
@@ -2809,7 +2809,7 @@

 	/* Returns the sine of an angle of x radians */

-	for (sin_idx = 0; sin_idx < SIZE(in_val, double); sin_idx++) {
+	for (sin_idx = 0; sin_idx < SIZE(sol_val, double); sin_idx++) {
 		ret_val[sin_idx] = sin(in_val[sin_idx]);
 		TC_ASSERT_LEQ("sin", fabs(sol_val[sin_idx] - ret_val[sin_idx]), FLT_EPSILON);
 	}
@@ -2835,7 +2835,7 @@

 	/* Returns the sine of an angle of x radians */

-	for (sinf_idx = 0; sinf_idx < SIZE(in_val, float); sinf_idx++) {
+	for (sinf_idx = 0; sinf_idx < SIZE(sol_val, float); sinf_idx++) {
 		ret_val[sinf_idx] = sinf(in_val[sinf_idx]);
 		TC_ASSERT_LEQ("sinf", fabsf(sol_val[sinf_idx] - ret_val[sinf_idx]), FLT_EPSILON);
 	}
@@ -2861,7 +2861,7 @@

 	/* Returns the hyperbolic sine of x */

-	for (sinh_idx = 0; sinh_idx < SIZE(in_val, double); sinh_idx++) {
+	for (sinh_idx = 0; sinh_idx < SIZE(sol_val, double); sinh_idx++) {
 		ret_val[sinh_idx] = sinh(in_val[sinh_idx]);
 		TC_ASSERT_LEQ("sinh", fabs(sol_val[sinh_idx] - ret_val[sinh_idx]), FLT_EPSILON);
 	}
@@ -2887,7 +2887,7 @@

 	/* Returns the hyperbolic sine of x */

-	for (sinhf_idx = 0; sinhf_idx < SIZE(in_val, float); sinhf_idx++) {
+	for (sinhf_idx = 0; sinhf_idx < SIZE(sol_val, float); sinhf_idx++) {
 		ret_val[sinhf_idx] = sinhf(in_val[sinhf_idx]);
 		TC_ASSERT_LEQ("sinhf", fabsf(sol_val[sinhf_idx] - ret_val[sinhf_idx]), FLT_EPSILON);
 	}
@@ -2913,7 +2913,7 @@

 	/* Returns the hyperbolic sine of x */

-	for (sinhl_idx = 0; sinhl_idx < SIZE(in_val, long double); sinhl_idx++) {
+	for (sinhl_idx = 0; sinhl_idx < SIZE(sol_val, long double); sinhl_idx++) {
 		ret_val[sinhl_idx] = sinhl(in_val[sinhl_idx]);
 		TC_ASSERT_LEQ("sinhl", fabsl(sol_val[sinhl_idx] - ret_val[sinhl_idx]), FLT_EPSILON);
 	}
@@ -2939,7 +2939,7 @@

 	/* Returns the sine of an angle of x radians */

-	for (sinl_idx = 0; sinl_idx < SIZE(in_val, long double); sinl_idx++) {
+	for (sinl_idx = 0; sinl_idx < SIZE(sol_val, long double); sinl_idx++) {
 		ret_val[sinl_idx] = sinl(in_val[sinl_idx]);
 		TC_ASSERT_LEQ("sinl", fabsl(sol_val[sinl_idx] - ret_val[sinl_idx]), FLT_EPSILON);
 	}
@@ -2963,7 +2963,7 @@
 	double ret_val[SIZE(sol_val, double)];
 	int sqrt_idx;

-	for (sqrt_idx = 0; sqrt_idx < SIZE(in_val, double); sqrt_idx++) {
+	for (sqrt_idx = 0; sqrt_idx < SIZE(sol_val, double); sqrt_idx++) {
 		ret_val[sqrt_idx] = sqrt(in_val[sqrt_idx]);
 		if (!(isnan(sol_val[sqrt_idx]) && isnan(ret_val[sqrt_idx]))) {
 			TC_ASSERT_LEQ("sqrt", fabs(sol_val[sqrt_idx] - ret_val[sqrt_idx]), FLT_EPSILON);
@@ -2989,7 +2989,7 @@
 	float ret_val[SIZE(sol_val, float)];
 	int sqrtf_idx;

-	for (sqrtf_idx = 0; sqrtf_idx < SIZE(in_val, float); sqrtf_idx++) {
+	for (sqrtf_idx = 0; sqrtf_idx < SIZE(sol_val, float); sqrtf_idx++) {
 		ret_val[sqrtf_idx] = sqrtf(in_val[sqrtf_idx]);
 		if (!(isnan(sol_val[sqrtf_idx]) && isnan(ret_val[sqrtf_idx]))) {
 			TC_ASSERT_LEQ("sqrtf", fabsf(sol_val[sqrtf_idx] - ret_val[sqrtf_idx]), FLT_EPSILON);
@@ -3015,7 +3015,7 @@
 	long double ret_val[SIZE(sol_val, long double)];
 	int sqrtl_idx;

-	for (sqrtl_idx = 0; sqrtl_idx < SIZE(in_val, long double); sqrtl_idx++) {
+	for (sqrtl_idx = 0; sqrtl_idx < SIZE(sol_val, long double); sqrtl_idx++) {
 		ret_val[sqrtl_idx] = sqrtl(in_val[sqrtl_idx]);
 		if (!(isnan(sol_val[sqrtl_idx]) && isnan(ret_val[sqrtl_idx]))) {
 			TC_ASSERT_LEQ("sqrtl", fabsl(sol_val[sqrtl_idx] - ret_val[sqrtl_idx]), FLT_EPSILON);
@@ -3199,7 +3199,7 @@

 	/* Round to truncated integer value */

-	for (trunc_idx = 0; trunc_idx < SIZE(in_val, double); trunc_idx++) {
+	for (trunc_idx = 0; trunc_idx < SIZE(sol_val, double); trunc_idx++) {
 		ret_val[trunc_idx] = trunc(in_val[trunc_idx]);
 		TC_ASSERT_LEQ("trunc", fabs(sol_val[trunc_idx] - ret_val[trunc_idx]), FLT_EPSILON);
 	}
@@ -3225,7 +3225,7 @@

 	/* Round to truncated integer value */

-	for (truncf_idx = 0; truncf_idx < SIZE(in_val, float); truncf_idx++) {
+	for (truncf_idx = 0; truncf_idx < SIZE(sol_val, float); truncf_idx++) {
 		ret_val[truncf_idx] = truncf(in_val[truncf_idx]);
 		TC_ASSERT_LEQ("truncf", fabs(sol_val[truncf_idx] - ret_val[truncf_idx]), FLT_EPSILON);
 	}
@@ -3249,7 +3249,7 @@
 	double ret_val[SIZE(sol_val, double)];
 	int y0_idx;

-	for (y0_idx = 0; y0_idx < SIZE(in_val, double); y0_idx++) {
+	for (y0_idx = 0; y0_idx < SIZE(sol_val, double); y0_idx++) {
 		ret_val[y0_idx] = y0(in_val[y0_idx]);
 		if (!(isnan(sol_val[y0_idx]) && isnan(ret_val[y0_idx]))) {
 			TC_ASSERT_LEQ("y0", fabs(sol_val[y0_idx] - ret_val[y0_idx]), FLT_EPSILON);
@@ -3275,7 +3275,7 @@
 	float ret_val[SIZE(sol_val, float)];
 	int y0f_idx;

-	for (y0f_idx = 0; y0f_idx < SIZE(in_val, float); y0f_idx++) {
+	for (y0f_idx = 0; y0f_idx < SIZE(sol_val, float); y0f_idx++) {
 		ret_val[y0f_idx] = y0f(in_val[y0f_idx]);
 		if (!(isnan(sol_val[y0f_idx]) && isnan(ret_val[y0f_idx]))) {
 			TC_ASSERT_LEQ("y0f", fabsf(sol_val[y0f_idx] - ret_val[y0f_idx]), FLT_EPSILON);
@@ -3301,7 +3301,7 @@
 	double ret_val[SIZE(sol_val, double)];
 	int y1_idx;

-	for (y1_idx = 0; y1_idx < SIZE(in_val, double); y1_idx++) {
+	for (y1_idx = 0; y1_idx < SIZE(sol_val, double); y1_idx++) {
 		ret_val[y1_idx] = y1(in_val[y1_idx]);
 		if (!(isnan(sol_val[y1_idx]) && isnan(ret_val[y1_idx]))) {
 			TC_ASSERT_LEQ("y1", fabs(sol_val[y1_idx] - ret_val[y1_idx]), FLT_EPSILON);
@@ -3327,7 +3327,7 @@
 	float ret_val[SIZE(sol_val, float)];
 	int y1f_idx;

-	for (y1f_idx = 0; y1f_idx < SIZE(in_val, float); y1f_idx++) {
+	for (y1f_idx = 0; y1f_idx < SIZE(sol_val, float); y1f_idx++) {
 		ret_val[y1f_idx] = y1f(in_val[y1f_idx]);
 		if (!(isnan(sol_val[y1f_idx]) && isnan(ret_val[y1f_idx]))) {
 			TC_ASSERT_LEQ("y1f", fabsf(sol_val[y1f_idx] - ret_val[y1f_idx]), FLT_EPSILON);
@@ -3350,7 +3350,7 @@
 {
 	const double in_val[] = { ZERO, VAL1, -VAL1, VAL2, -VAL2, INFINITY, -INFINITY, NAN, 0x1p302 };
 	const double sol_val[][7] = { { INFINITY, -INFINITY, -INFINITY, -INFINITY, -INFINITY, -INFINITY, -INFINITY }, { ZERO, ZERO, -ZERO, -ZERO, ZERO, ZERO, -ZERO }, { NAN, NAN, NAN, NAN, NAN, NAN, NAN }, { ZERO, ZERO, -ZERO, -ZERO, ZERO, ZERO, -ZERO }, { NAN, NAN, NAN, NAN, NAN, NAN, NAN }, { -ZERO, ZERO, ZERO, ZERO, ZERO, ZERO, ZERO }, { NAN, NAN, NAN, NAN, NAN, NAN, NAN }, { NAN, NAN, NAN, NAN, NAN, NAN, NAN }, { -ZERO, -ZERO, ZERO, ZERO, -ZERO, -ZERO, ZERO } };
-	double ret_val[SIZE(sol_val, double)][7];
+	double ret_val[SIZE(in_val, double)][7];
 	int yn_idx;
 	int order_idx;


modpost: Ignore ARC specific non-alloc sections

ARC relocatable object files contain one/more .gnu.linkonce.arcextmap.*
sections (collated by kernel/vmlinux.lds into .arcextmap in final link).
This section is used by debuggers to display the extension instructions
and need-not be loaded by target (hence !SHF_ALLOC)

The final kernel binary only needs .arcextmap entry in modpost's ignore
list (section_white_list[]). However when building modules, modpost scans
each object file individually, hence tripping on non-aggregated
.gnu.linkonce.arcextmap.* entries as well.

Thus need for the 2 entires !

Signed-off-by: Vineet Gupta <af669d95a4c0de051445d4cafdbb2c5c4a2838be@synopsys.com>
Acked-by: Sam Ravnborg <f16bed56189e249fe4ca8ed10a1ecae60e8ceac0@ravnborg.org>
Signed-off-by: Rusty Russell <df9728c9e5104131c08c7adb03af425394842596@rustcorp.com.au>

--- scripts/mod/modpost.c
+++ scripts/mod/modpost.c
@@ -830,6 +830,8 @@
 	".toc*",
 	".xt.prop",				 /* xtensa */
 	".xt.lit",         /* xtensa */
+	".arcextmap*",			/* arc */
+	".gnu.linkonce.arcext*",	/* arc : modules */
 	NULL
 };


Add invariants checks to all assignment operators of the 'SparseColumn' class template

--- blaze/math/views/SparseColumn.h
+++ blaze/math/views/SparseColumn.h
@@ -798,8 +798,7 @@
       assign( left, rhs );
    }

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -852,8 +851,7 @@
       assign( left, right );
    }

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -908,8 +906,7 @@
       assign( left, right );
    }

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -963,8 +960,7 @@
    left.reset();
    assign( left, tmp );

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -1019,8 +1015,7 @@
    left.reserve( tmp.nonZeros() );
    assign( left, tmp );

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -1075,8 +1070,7 @@
    left.reset();
    assign( left, tmp );

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -1132,8 +1126,7 @@
    left.reserve( tmp.nonZeros() );
    assign( left, tmp );

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -1184,8 +1177,7 @@
    left.reset();
    assign( left, tmp );

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -2711,8 +2703,7 @@
       assign( left, rhs );
    }

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -2753,8 +2744,7 @@

    assign( left, tmp );

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -2806,8 +2796,7 @@

    assign( left, tmp );

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -2859,8 +2848,7 @@

    assign( left, tmp );

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -2911,8 +2899,7 @@

    assign( left, tmp );

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -4095,8 +4082,7 @@
       assign( left, rhs );
    }

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -4150,8 +4136,7 @@
       assign( left, right );
    }

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -4207,8 +4192,7 @@
       assign( left, right );
    }

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -4263,8 +4247,7 @@
    left.reset();
    assign( left, tmp );

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -4320,8 +4303,7 @@
    left.reserve( tmp.nonZeros() );
    assign( left, tmp );

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -4377,8 +4359,7 @@
    left.reset();
    assign( left, tmp );

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -4435,8 +4416,7 @@
    left.reserve( tmp.nonZeros() );
    assign( left, tmp );

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }
@@ -4488,8 +4468,7 @@
    left.reset();
    assign( left, tmp );

-   BLAZE_INTERNAL_ASSERT( !IsLower<MT>::value || isLower( derestrict( matrix_ ) ), "Lower violation detected" );
-   BLAZE_INTERNAL_ASSERT( !IsUpper<MT>::value || isUpper( derestrict( matrix_ ) ), "Upper violation detected" );
+   BLAZE_INTERNAL_ASSERT( isIntact( matrix_ ), "Invariant violation detected" );

    return *this;
 }


Small fix for making this KLD to compile.

--- share/examples/kld/firmware/fwconsumer/fw_consumer.c
+++ share/examples/kld/firmware/fwconsumer/fw_consumer.c
@@ -36,7 +36,7 @@
 #include <sys/proc.h>
 #include <sys/module.h>

-static struct firmware *fp;
+static const struct firmware *fp;

 static int
 fw_consumer_modevent(module_t mod, int type, void *unused)


i965/fs: fix regs_written in LOAD_PAYLOAD for doubles

v2: Account for the stride of the dst (Iago)

Signed-off-by: Iago Toral Quiroga <a847aabaac44184372f6b1cd1a59aa254daaeb0b@igalia.com>
Reviewed-by: Kenneth Graunke <bd2562f754ec92342f93f61c25d731e290a2ffa8@whitecape.org>
Reviewed-by: Jordan Justen <a79006884ba9cf5f4f7fcbb92a15b208780d8c97@intel.com>


Fix include error

Fix include error

--- ports/esp32s2/common-hal/neopixel_write/__init__.c
+++ ports/esp32s2/common-hal/neopixel_write/__init__.c
@@ -41,6 +41,7 @@
  */

 #include "py/mphal.h"
+#include "py/runtime.h"
 #include "shared-bindings/neopixel_write/__init__.h"
 #include "driver/rmt.h"
 #include "rmt.h"
@@ -102,7 +103,7 @@
     // Convert NS timings to ticks
     uint32_t counter_clk_hz = 0;
     if (rmt_get_counter_clock(config.channel, &counter_clk_hz) != ESP_OK) {
-        mp_raise_ValueError(translate("Could not retrieve clock"));
+        mp_raise_RuntimeError(translate("Could not retrieve clock"));
     }
     float ratio = (float)counter_clk_hz / 1e9;
     ws2812_t0h_ticks = (uint32_t)(ratio * WS2812_T0H_NS);
@@ -115,7 +116,7 @@

     // Write and wait to finish
     if(rmt_write_sample(config.channel, pixels, (size_t)numBytes, true) != ESP_OK) {
-        mp_raise_ValueError(translate("Input/output error"));
+        mp_raise_RuntimeError(translate("Input/output error"));
     }
     rmt_wait_tx_done(config.channel, pdMS_TO_TICKS(100));


ipreasm.h: prefix reasm symbols with nmsg_

--- nmsg/ipreasm.h
+++ nmsg/ipreasm.h
@@ -1,5 +1,16 @@
-#ifndef _IPREASM_H
-#define _IPREASM_H
+#ifndef NMSG_IPREASM_H
+#define NMSG_IPREASM_H
+
+#define reasm_time_t		nmsg_reasm_time_t
+#define reasm_ip		nmsg_reasm_ip
+#define reasm_ip_new		nmsg_reasm_ip_new
+#define reasm_ip_free		nmsg_reasm_ip_free
+#define reasm_ip_next		nmsg_reasm_ip_next
+#define reasm_ip_set_timeout	nmsg_reasm_ip_set_timeout
+#define reasm_ip_waiting	nmsg_reasm_ip_waiting
+#define reasm_ip_max_waiting	nmsg_reasm_ip_max_waiting
+#define reasm_ip_timed_out	nmsg_reasm_ip_timed_out
+#define reasm_ip_dropped_frags	nmsg_reasm_ip_dropped_frags

 /*
  * Copyright (c) 2007  Jan Andres <jandres@gmx.net>
@@ -41,7 +52,10 @@
  * If frag_hdr_offset is not zero, for IPv6 packets, it specifies the
  * offset into the packet at which the fragment header starts.
  */
-bool reasm_ip_next (struct reasm_ip *reasm, const unsigned char *packet, unsigned len, unsigned frag_hdr_offset, reasm_time_t timestamp, unsigned char *out_packet, unsigned *output_len);
+bool reasm_ip_next (struct reasm_ip *reasm, const unsigned char *packet,
+		    unsigned len, unsigned frag_hdr_offset,
+		    reasm_time_t timestamp, unsigned char *out_packet,
+		    unsigned *output_len);

 /*
  * Set the timeout after which a noncompleted reassembly expires, in
@@ -57,5 +71,4 @@
 unsigned reasm_ip_timed_out (const struct reasm_ip *reasm);
 unsigned reasm_ip_dropped_frags (const struct reasm_ip *reasm);

-
-#endif /* _IPREASM_H */
+#endif /* NMSG_IPREASM_H */


Fix class/struct mismatch.

Fix class/struct mismatch.

--- HippoMocks0x/hippomocks.h
+++ HippoMocks0x/hippomocks.h
@@ -79,7 +79,7 @@
 struct NotPrintable { template <typename T> NotPrintable(T const&) {} };

 class DontCare {};
-static struct DontCare DONTCARE_NAME;
+static class DontCare DONTCARE_NAME;

 inline std::ostream &operator<<(std::ostream &os, DontCare const&)
 {


remove recursive locking

remove recursive locking

--- pfl/opstats.c
+++ pfl/opstats.c
@@ -49,7 +49,7 @@
 pfl_opstat_initf(int flags, const char *namefmt, ...)
 {
 	struct pfl_opstat *opst;
-	int pos, locked;
+	int pos;
 	va_list ap;
 	char *name;

@@ -57,13 +57,13 @@
 	pfl_vasprintf(&name, namefmt, ap);
 	va_end(ap);

-	locked = reqlock(&pfl_opstats_lock);
+	spinlock(&pfl_opstats_lock);
 	pos = psc_dynarray_bsearch(&pfl_opstats, name, _pfl_opstat_cmp);
 	if (pos < psc_dynarray_len(&pfl_opstats)) {
 		opst = psc_dynarray_getpos(&pfl_opstats, pos);
 		if (strcmp(name, opst->opst_name) == 0) {
 			psc_assert((flags & OPSTF_EXCL) == 0);
-			ureqlock(&pfl_opstats_lock, locked);
+			freelock(&pfl_opstats_lock);
 			PSCFREE(name);
 			return (opst);
 		}
@@ -72,7 +72,7 @@
 	opst->opst_name = name;
 	opst->opst_flags = flags;
 	psc_dynarray_splice(&pfl_opstats, pos, 0, &opst, 1);
-	ureqlock(&pfl_opstats_lock, locked);
+	freelock(&pfl_opstats_lock);
 	return (opst);
 }


This commit was generated by cvs2svn to compensate for changes in r25, which
included commits to RCS files with non-trunk default branches.

git-svn-id: c79564a500b7e594ddd40d64e0429b877c6247ac@26 1529d479-2984-44b7-a8f3-1f17ffde0828

error: pathspec 'zzip/stdint.h' did not match any file(s) known to git

--- zzip/stdint.h
+++ zzip/stdint.h
@@ -0,0 +1,43 @@
+#ifndef _ZZIP__STDINT_H /* zzip-stdint.h */
+#define _ZZIP__STDINT_H 1
+/* this file ensures that we have some kind of typedef declarations for
+   unsigned C9X typedefs. The ISO C 9X: 7.18 Integer types file is stdint.h
+ */
+
+#include <zzip/conf.h>
+
+/* enforce use of ifdef'd C9X entries in system headers */
+#define __USE_ANSI 1
+#define __USE_ISOC9X 1
+
+#ifdef ZZIP_HAVE_STDINT_H
+    /* ISO C 9X: 7.18 Integer types <stdint.h> */
+#include <stdint.h>
+#elif defined ZZIP_HAVE_SYS_INT_TYPES_H /*solaris*/
+#include <sys/int_types.h>
+#elif defined ZZIP_HAVE_INTTYPES_H /*freebsd*/
+#include <inttypes.h>
+#else
+    typedef unsigned char uint8_t;      typedef signed char int8_t;
+
+# if ZZIP_SIZEOF_INT && ZZIP_SIZEOF_INT == 2
+    typedef unsigned int uint16_t;      typedef signed int int16_t;
+# elif ZZIP_SIZEOF_SHORT && ZZIP_SIZEOF_SHORT == 2
+    typedef unsigned short uint16_t;    typedef signed short int16_t;
+# else
+#   error unable to typedef int16_t from either int or short
+    typedef unsigned short uint16_t;    typedef signed short int16_t;
+# endif
+
+# if defined ZZIP_SIZEOF_INT && ZZIP_SIZEOF_INT == 4
+    typedef unsigned int uint32_t;      typedef signed int int32_t;
+# elif defined ZZIP_SIZEOF_LONG && ZZIP_SIZEOF_LONG == 4
+    typedef unsigned long uint32_t;     typedef signed long int32_t;
+# else
+#   error unable to typedef int32_t from either int or long
+    typedef unsigned long uint32_t;     typedef signed long int32_t;
+# endif
+#endif
+
+#endif /*_ZZIP_STDINT_H*/
+


Added force refresh of interrupt registers in stepTimerStart, speeds start up by 1ms

--- src/timer/stm32/TimerField.h
+++ src/timer/stm32/TimerField.h
@@ -50,6 +50,9 @@
 void TimerField::stepTimerStart()
 {
   stepTimer.resume();
+  // force reload of all timer's registers here saves 1.2ms in startup time
+  // https://github.com/stm32duino/wiki/wiki/HardwareTimer-library
+  stepTimer.refresh();
   stepTimerRunning = true;
 }


Increased the functionality of the tensor devices

--- unsupported/Eigen/CXX11/src/Tensor/TensorDeviceType.h
+++ unsupported/Eigen/CXX11/src/Tensor/TensorDeviceType.h
@@ -43,11 +43,14 @@

 static EIGEN_STRONG_INLINE void wait_until_ready(const Future* f) {
   f->wait();
-  //   eigen_assert(f->ready());
+}
+static EIGEN_STRONG_INLINE void get_when_ready(Future* f) {
+  f->get();
 }

+
 struct ThreadPoolDevice {
-  ThreadPoolDevice(/*ThreadPool* pool, */size_t num_cores) : num_threads_(num_cores) { }
+  ThreadPoolDevice(size_t num_cores) : num_threads_(num_cores) { }

   EIGEN_STRONG_INLINE void* allocate(size_t num_bytes) const {
     return internal::aligned_malloc(num_bytes);
@@ -79,9 +82,9 @@
   }

  private:
-  // todo: NUMA, ...
   size_t num_threads_;
 };
+
 #endif

@@ -114,6 +117,10 @@
   return m_deviceProperties.sharedMemPerBlock;
 }

+static inline void setCudaSharedMemConfig(cudaSharedMemConfig config) {
+  cudaError_t status = cudaDeviceSetSharedMemConfig(config);
+  assert(status == cudaSuccess);
+}

 struct GpuDevice {
   // The cudastream is not owned: the caller is responsible for its initialization and eventual destruction.
@@ -163,10 +170,19 @@
     return 32;
   }

+  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void synchronize() const {
+    cudaStreamSynchronize(*stream_);
+  }
+
  private:
   // TODO: multigpu.
   const cudaStream_t* stream_;
 };
+
+#define LAUNCH_CUDA_KERNEL(kernel, gridsize, blocksize, sharedmem, device, ...)            \
+  (kernel) <<< (gridsize), (blocksize), (sharedmem), (device).stream() >>> (__VA_ARGS__);  \
+  assert(cudaGetLastError() == cudaSuccess);
+
 #endif

 }  // end namespace Eigen


conf: Introduce virDomainControllerDefPostParse()

Signed-off-by: Andrea Bolognani <3ada0bee826c753786fdbba72243dfba997094cf@redhat.com>
Reviewed-by: Ján Tomko <4cab11cfb98d3c937327354a78eb07dbb6ee2bc6@redhat.com>

--- src/conf/domain_conf.c
+++ src/conf/domain_conf.c
@@ -4918,6 +4918,22 @@

 static int
+virDomainControllerDefPostParse(virDomainControllerDefPtr cdev)
+{
+    if (cdev->iothread &&
+        cdev->model != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI) {
+        virReportError(VIR_ERR_XML_ERROR,
+                       _("'iothread' attribute only supported for "
+                         "controller model '%s'"),
+                       virDomainControllerModelSCSITypeToString(VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI));
+        return -1;
+    }
+
+    return 0;
+}
+
+
+static int
 virDomainVsockDefPostParse(virDomainVsockDefPtr vsock)
 {
     if (vsock->auto_cid == VIR_TRISTATE_BOOL_ABSENT) {
@@ -4954,18 +4970,8 @@
         virDomainHostdevDefPostParse(dev->data.hostdev, def, xmlopt) < 0)
         return -1;

-    if (dev->type == VIR_DOMAIN_DEVICE_CONTROLLER) {
-        virDomainControllerDefPtr cdev = dev->data.controller;
-
-        if (cdev->iothread &&
-            cdev->model != VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI) {
-            virReportError(VIR_ERR_XML_ERROR,
-                           _("'iothread' attribute only supported for "
-                             "controller model '%s'"),
-                           virDomainControllerModelSCSITypeToString(VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI));
-            return -1;
-        }
-    }
+    if (dev->type == VIR_DOMAIN_DEVICE_CONTROLLER)
+        return virDomainControllerDefPostParse(dev->data.controller);

     if (dev->type == VIR_DOMAIN_DEVICE_NET) {
         virDomainNetDefPtr net = dev->data.net;


added the TX event type

added the TX event type

--- nRF51/rbc_mesh/rbc_mesh.h
+++ nRF51/rbc_mesh/rbc_mesh.h
@@ -59,7 +59,7 @@
     RBC_MESH_EVENT_TYPE_CONFLICTING_VAL, /** Another node has a conflicting version of the value */
     RBC_MESH_EVENT_TYPE_NEW_VAL,         /** A previously unallocated value has been received and allocated */
     RBC_MESH_EVENT_TYPE_INITIALIZED,     /** The framework has been initialized internally (most likely via serial interface) */
-    RBC_MESH_EVENT_TYPE_TX               /** The indicated handle was transmitted */
+    RBC_MESH_EVENT_TYPE_TX,              /** The indicated handle was transmitted */
 } rbc_mesh_event_type_t;

 /**
@@ -192,7 +192,6 @@
 */
 uint32_t rbc_mesh_stop(void);

-
 /**
 * @brief Set the contents of the data array pointed to by the provided handle
 *


Freed all Scodpot variables in Allplots.c

--- pynpact/src/Allplots.c
+++ pynpact/src/Allplots.c
@@ -1616,7 +1616,9 @@
         /* Prints Hits */
         /***************/

-        if(nScp) fprintf(stdout,"\n");
+    if(nScp)
+    {
+    fprintf(stdout,"\n");

         for(i= 0; i < nScp; ++i)
 	{
@@ -1642,7 +1644,14 @@
                 fprintf(stdout, "L1 Gray");
                 fprintf(stdout, " %.1f %.2f M %.1f %.2f L stroke\n", (Scodpot[i][0] - (float)start) / delta * WIDTH, HIGHT + HIGHT_SCP, (Scodpot[i][1] - (float)start) / delta * WIDTH, HIGHT + HIGHT_SCP);
             }
-        }
+        free(Scodpot_type[i]);
+        free(Scodpot[i]);
+        }
+    free(Scodpot_str);
+    free(Scodpot_col);
+    free(Scodpot_type);
+    free(Scodpot);
+    }

         fprintf(stdout,"\nL05\n");


net: l2: ppp: Assign IPv4 address received with IPCP

Store the IPv4 address into the local LCP options and set it
as the interface IP address once IPCP negotiation is complete.

Fix calling the correct function when an IPCP Configure Reject
is received carrying our local IP address.

Signed-off-by: Patrik Flykt <c0e05887987e3015fb9a12ef640a972ca16d7be2@intel.com>

--- subsys/net/l2/ppp/ipcp.c
+++ subsys/net/l2/ppp/ipcp.c
@@ -51,11 +51,7 @@
 	struct net_buf *buf;
 	bool added;

-	my_addr = net_if_ipv4_select_src_addr(ctx->iface,
-					      &ctx->ipcp.peer_options.address);
-	if (!my_addr) {
-		my_addr = net_ipv4_unspecified_address();
-	}
+	my_addr = &ctx->ipcp.my_options.address;

 	option[0] = IPCP_OPTION_IP_ADDRESS;
 	option[1] = IP_ADDRESS_OPTION_LEN;
@@ -70,6 +66,9 @@
 	if (!added) {
 		goto out_of_mem;
 	}
+
+	NET_DBG("Added IPCP IP Address option %d.%d.%d.%d",
+		option[2], option[3], option[4], option[5]);

 	return buf;

@@ -267,10 +266,13 @@
 	return -ENOMEM;
 }

-static int ipcp_config_info_rej(struct ppp_fsm *fsm,
-				struct net_pkt *pkt,
-				u16_t length)
-{
+static int ipcp_config_info_nack(struct ppp_fsm *fsm,
+				 struct net_pkt *pkt,
+				 u16_t length,
+				 bool rejected)
+{
+	struct ppp_context *ctx = CONTAINER_OF(fsm, struct ppp_context,
+					       ipcp.fsm);
 	struct ppp_option_pkt nack_options[MAX_IPCP_OPTIONS];
 	enum net_verdict verdict;
 	int i, ret, address_option_idx = -1;
@@ -325,6 +327,8 @@
 		return -EMSGSIZE;
 	}

+	memcpy(&ctx->ipcp.my_options.address, &addr, sizeof(addr));
+
 	if (CONFIG_NET_L2_PPP_LOG_LEVEL >= LOG_LEVEL_DBG) {
 		char dst[INET_ADDRSTRLEN];
 		char *addr_str;
@@ -363,11 +367,27 @@
 {
 	struct ppp_context *ctx = CONTAINER_OF(fsm, struct ppp_context,
 					       ipcp.fsm);
+	struct net_if_addr *addr;
+	char dst[INET_ADDRSTRLEN];
+	char *addr_str;

 	if (ctx->is_ipcp_up) {
 		return;
 	}

+	addr_str = net_addr_ntop(AF_INET, &ctx->ipcp.my_options.address,
+				 dst, sizeof(dst));
+
+	addr = net_if_ipv4_addr_add(ctx->iface,
+				    &ctx->ipcp.my_options.address,
+				    NET_ADDR_MANUAL,
+				    0);
+	if (addr == NULL) {
+		NET_ERR("Could not set IP address %s", log_strdup(addr_str));
+		return;
+	}
+
+	NET_DBG("PPP up with address %s", log_strdup(addr_str));
 	ppp_network_up(ctx, PPP_IP);

 	ctx->is_network_up = true;
@@ -428,7 +448,7 @@
 	ctx->ipcp.fsm.cb.proto_reject = ipcp_proto_reject;
 	ctx->ipcp.fsm.cb.config_info_add = ipcp_config_info_add;
 	ctx->ipcp.fsm.cb.config_info_req = ipcp_config_info_req;
-	ctx->ipcp.fsm.cb.config_info_rej = ipcp_config_info_rej;
+	ctx->ipcp.fsm.cb.config_info_nack = ipcp_config_info_nack;
 }

 PPP_PROTOCOL_REGISTER(IPCP, PPP_IPCP,


Add missing io

Add missing io

--- libs/compiler/compiler.c
+++ libs/compiler/compiler.c
@@ -164,6 +164,7 @@

 	io_erase(&temp);

+	context.io = io;
 	output_tables_and_tree(&sx, &context, DEFAULT_TREE);
 	if (!context.error_flag)
 	{


kbuild: add missing return statement in modpost.c:secref_whitelist()

Noticed by: Magnus Damm <magnus@valinux.co.jp>

Signed-off-by: Sam Ravnborg <f16bed56189e249fe4ca8ed10a1ecae60e8ceac0@ravnborg.org>

--- scripts/mod/modpost.c
+++ scripts/mod/modpost.c
@@ -627,6 +627,7 @@
 		    (strcmp(tosec, ".init.text") == 0))
 		return 1;
 	}
+	return 0;
 }

 /**


arch/x86: Create syscall __do_syscall{0..6} macros

Reduce arch dependent code by creating __do_syscall{0..6} macros.
These macros are made of inline Assembly x86-64. Use them to invoke
syscall via __sys* functions. By using this design, we don't have to
code in inline Assembly again when adding a new syscall.

Tested on Linux x86-64, all test passed, but rsrc_tags timedout.

Tested-by: Arthur Lapz <3faa21c580027d9da46bf025aa84662fdb9c5da0@gnuweeb.org>
Tested-by: Nugra <7f88bb68e14d386d89af3cf317f6f7af1d39246c@gnuweeb.org>
Signed-off-by: Alviro Iskandar Setiawan <acb00eee907e465a4ea2ca150e2639c8348f1d28@gnuweeb.org>
Signed-off-by: Ammar Faizi <a8266392a329a5c7b5ab982a8996391d75b6438e@gnuweeb.org>
Link: https://lore.kernel.org/r/20220215153651.181319-3-a8266392a329a5c7b5ab982a8996391d75b6438e@gnuweeb.org
Signed-off-by: Jens Axboe <cd8c6775e60d6f67a6984377324e5290df3d5358@kernel.dk>


Serialize the computation in the 'addAssign' and 'subAssign' functions of the 'SparseColumn' class template

--- blaze/math/views/SparseColumn.h
+++ blaze/math/views/SparseColumn.h
@@ -55,6 +55,7 @@
 #include <blaze/math/Functions.h>
 #include <blaze/math/shims/IsDefault.h>
 #include <blaze/math/shims/Reset.h>
+#include <blaze/math/shims/Serial.h>
 #include <blaze/math/traits/AddTrait.h>
 #include <blaze/math/traits/ColumnTrait.h>
 #include <blaze/math/traits/DivTrait.h>
@@ -1468,7 +1469,7 @@

    BLAZE_INTERNAL_ASSERT( size() == (~rhs).size(), "Invalid vector sizes" );

-   const AddType tmp( *this + (~rhs) );
+   const AddType tmp( serial( *this + (~rhs) ) );
    matrix_.reset( col_ );
    assign( tmp );
 }
@@ -1499,7 +1500,7 @@

    BLAZE_INTERNAL_ASSERT( size() == (~rhs).size(), "Invalid vector sizes" );

-   const AddType tmp( *this + (~rhs) );
+   const AddType tmp( serial( *this + (~rhs) ) );
    matrix_.reset  ( col_ );
    matrix_.reserve( col_, tmp.nonZeros() );
    assign( tmp );
@@ -1531,7 +1532,7 @@

    BLAZE_INTERNAL_ASSERT( size() == (~rhs).size(), "Invalid vector sizes" );

-   const SubType tmp( *this - (~rhs) );
+   const SubType tmp( serial( *this - (~rhs) ) );
    matrix_.reset( col_ );
    assign( tmp );
 }
@@ -1562,7 +1563,7 @@

    BLAZE_INTERNAL_ASSERT( size() == (~rhs).size(), "Invalid vector sizes" );

-   const SubType tmp( *this - (~rhs) );
+   const SubType tmp( serial( *this - (~rhs) ) );
    matrix_.reset  ( col_ );
    matrix_.reserve( col_, tmp.nonZeros() );
    assign( tmp );
@@ -3031,7 +3032,7 @@

    BLAZE_INTERNAL_ASSERT( size() == (~rhs).size(), "Invalid vector sizes" );

-   const AddType tmp( *this + (~rhs) );
+   const AddType tmp( serial( *this + (~rhs) ) );
    assign( tmp );
 }
 /*! \endcond */
@@ -3061,7 +3062,7 @@

    BLAZE_INTERNAL_ASSERT( size() == (~rhs).size(), "Invalid vector sizes" );

-   const SubType tmp( *this - (~rhs) );
+   const SubType tmp( serial( *this - (~rhs) ) );
    assign( tmp );
 }
 /*! \endcond */


fixed a vim typo...

fixed a vim typo...


Updated motor pin names

Updated motor pin names

--- ports/raspberrypi/boards/pimoroni_motor2040/pins.c
+++ ports/raspberrypi/boards/pimoroni_motor2040/pins.c
@@ -3,24 +3,24 @@
 STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
     CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS

-    { MP_ROM_QSTR(MP_QSTR_MOTOR_1P), MP_ROM_PTR(&pin_GPIO4) },
-    { MP_ROM_QSTR(MP_QSTR_MOTOR_1N), MP_ROM_PTR(&pin_GPIO5) },
-    { MP_ROM_QSTR(MP_QSTR_MOTOR_2P), MP_ROM_PTR(&pin_GPIO6) },
-    { MP_ROM_QSTR(MP_QSTR_MOTOR_2N), MP_ROM_PTR(&pin_GPIO7) },
-    { MP_ROM_QSTR(MP_QSTR_MOTOR_3P), MP_ROM_PTR(&pin_GPIO8) },
-    { MP_ROM_QSTR(MP_QSTR_MOTOR_3N), MP_ROM_PTR(&pin_GPIO9) },
-    { MP_ROM_QSTR(MP_QSTR_MOTOR_4P), MP_ROM_PTR(&pin_GPIO10) },
-    { MP_ROM_QSTR(MP_QSTR_MOTOR_4N), MP_ROM_PTR(&pin_GPIO11) },
+    { MP_ROM_QSTR(MP_QSTR_MOTOR_A_P), MP_ROM_PTR(&pin_GPIO4) },
+    { MP_ROM_QSTR(MP_QSTR_MOTOR_A_N), MP_ROM_PTR(&pin_GPIO5) },
+    { MP_ROM_QSTR(MP_QSTR_MOTOR_B_P), MP_ROM_PTR(&pin_GPIO6) },
+    { MP_ROM_QSTR(MP_QSTR_MOTOR_B_N), MP_ROM_PTR(&pin_GPIO7) },
+    { MP_ROM_QSTR(MP_QSTR_MOTOR_C_P), MP_ROM_PTR(&pin_GPIO8) },
+    { MP_ROM_QSTR(MP_QSTR_MOTOR_C_N), MP_ROM_PTR(&pin_GPIO9) },
+    { MP_ROM_QSTR(MP_QSTR_MOTOR_D_P), MP_ROM_PTR(&pin_GPIO10) },
+    { MP_ROM_QSTR(MP_QSTR_MOTOR_D_N), MP_ROM_PTR(&pin_GPIO11) },
     { MP_ROM_QSTR(MP_QSTR_NUM_MOTORS), MP_ROM_INT(4) },

-    { MP_ROM_QSTR(MP_QSTR_ENCODER_1A), MP_ROM_PTR(&pin_GPIO0) },
-    { MP_ROM_QSTR(MP_QSTR_ENCODER_1B), MP_ROM_PTR(&pin_GPIO1) },
-    { MP_ROM_QSTR(MP_QSTR_ENCODER_2A), MP_ROM_PTR(&pin_GPIO2) },
-    { MP_ROM_QSTR(MP_QSTR_ENCODER_2B), MP_ROM_PTR(&pin_GPIO3) },
-    { MP_ROM_QSTR(MP_QSTR_ENCODER_3A), MP_ROM_PTR(&pin_GPIO12) },
-    { MP_ROM_QSTR(MP_QSTR_ENCODER_3B), MP_ROM_PTR(&pin_GPIO13) },
-    { MP_ROM_QSTR(MP_QSTR_ENCODER_4A), MP_ROM_PTR(&pin_GPIO14) },
-    { MP_ROM_QSTR(MP_QSTR_ENCODER_4B), MP_ROM_PTR(&pin_GPIO15) },
+    { MP_ROM_QSTR(MP_QSTR_ENCODER_A_A), MP_ROM_PTR(&pin_GPIO0) },
+    { MP_ROM_QSTR(MP_QSTR_ENCODER_A_B), MP_ROM_PTR(&pin_GPIO1) },
+    { MP_ROM_QSTR(MP_QSTR_ENCODER_B_A), MP_ROM_PTR(&pin_GPIO2) },
+    { MP_ROM_QSTR(MP_QSTR_ENCODER_B_B), MP_ROM_PTR(&pin_GPIO3) },
+    { MP_ROM_QSTR(MP_QSTR_ENCODER_C_A), MP_ROM_PTR(&pin_GPIO12) },
+    { MP_ROM_QSTR(MP_QSTR_ENCODER_C_B), MP_ROM_PTR(&pin_GPIO13) },
+    { MP_ROM_QSTR(MP_QSTR_ENCODER_D_A), MP_ROM_PTR(&pin_GPIO14) },
+    { MP_ROM_QSTR(MP_QSTR_ENCODER_D_B), MP_ROM_PTR(&pin_GPIO15) },
     { MP_ROM_QSTR(MP_QSTR_NUM_ENCODERS), MP_ROM_INT(4) },

     { MP_ROM_QSTR(MP_QSTR_TX_TRIG), MP_ROM_PTR(&pin_GPIO16) },
@@ -56,10 +56,10 @@

     { MP_ROM_QSTR(MP_QSTR_SHARED_ADC), MP_ROM_PTR(&pin_GPIO29) },

-    { MP_ROM_QSTR(MP_QSTR_CURRENT_SENSE_1_ADDR), MP_ROM_INT(0b000) },
-    { MP_ROM_QSTR(MP_QSTR_CURRENT_SENSE_2_ADDR), MP_ROM_INT(0b001) },
-    { MP_ROM_QSTR(MP_QSTR_CURRENT_SENSE_3_ADDR), MP_ROM_INT(0b010) },
-    { MP_ROM_QSTR(MP_QSTR_CURRENT_SENSE_4_ADDR), MP_ROM_INT(0b011) },
+    { MP_ROM_QSTR(MP_QSTR_CURRENT_SENSE_A_ADDR), MP_ROM_INT(0b000) },
+    { MP_ROM_QSTR(MP_QSTR_CURRENT_SENSE_B_ADDR), MP_ROM_INT(0b001) },
+    { MP_ROM_QSTR(MP_QSTR_CURRENT_SENSE_C_ADDR), MP_ROM_INT(0b010) },
+    { MP_ROM_QSTR(MP_QSTR_CURRENT_SENSE_D_ADDR), MP_ROM_INT(0b011) },
     { MP_ROM_QSTR(MP_QSTR_VOLTAGE_SENSE_ADDR), MP_ROM_INT(0b100) },
     { MP_ROM_QSTR(MP_QSTR_FAULT_SENSE_ADDR), MP_ROM_INT(0b101) },
     { MP_ROM_QSTR(MP_QSTR_SENSOR_1_ADDR), MP_ROM_INT(0b110) },


tracker-extract: Make sure we finalize the extractor object to print summary

--- src/tracker-extract/tracker-controller.c
+++ src/tracker-extract/tracker-controller.c
@@ -131,7 +131,6 @@
 	iface->init = tracker_controller_initable_init;
 }

-
 static void
 tracker_controller_finalize (GObject *object)
 {
@@ -147,6 +146,10 @@
 	}

 	tracker_controller_dbus_stop (controller);
+
+	if (priv->extractor) {
+		g_object_unref (priv->extractor);
+	}

 	g_object_unref (priv->storage);


gst/quicktime/gstqtmuxmap.c: Add video/x-qt-part and video/x-m4-part to caps so schroenc/schroparse can use it.  Fixes #5...

Original commit message from CVS:
* gst/quicktime/gstqtmuxmap.c: Add video/x-qt-part and video/x-m4-part
to caps so schroenc/schroparse can use it.  Fixes #566958

--- gst/quicktime/gstqtmuxmap.c
+++ gst/quicktime/gstqtmuxmap.c
@@ -135,7 +135,8 @@
             "systemstream = (boolean) false, "
             COMMON_VIDEO_CAPS "; "
             "image/jpeg, "
-            COMMON_VIDEO_CAPS_NO_FRAMERATE "; " "video/x-qt-part"),
+            COMMON_VIDEO_CAPS_NO_FRAMERATE "; "
+            "video/x-qt-part, " COMMON_VIDEO_CAPS),
         GST_STATIC_CAPS (PCM_CAPS_FULL "; "
             MP3_CAPS " ; "
             AAC_CAPS " ; "
@@ -153,7 +154,8 @@
         "GstMP4Mux",
         /* FIXME does not feel right, due to qt caps mess */
         GST_STATIC_CAPS ("video/quicktime"),
-        GST_STATIC_CAPS (MPEG4V_CAPS "; " H264_CAPS),
+        GST_STATIC_CAPS (MPEG4V_CAPS "; " H264_CAPS ";"
+            "video/x-mp4-part," COMMON_VIDEO_CAPS),
         GST_STATIC_CAPS (MP3_CAPS "; " AAC_CAPS)
       }
   ,


Correctly count number of descriptors for TOCINFO and TOCINFO2

--- src/cdtext.c
+++ src/cdtext.c
@@ -822,13 +822,25 @@
 	    num_descriptors += 3;
 	    block_descriptors[0] += 3;
 	}
-	/* Encode the TOCINFO with one descriptor plus one for each track. */
-	num_descriptors += (
-	    cdtext->toc.last_track_number -
-	    cdtext->toc.first_track_number + 2);
-	block_descriptors[0] += (
-	    cdtext->toc.last_track_number -
-	    cdtext->toc.first_track_number + 2);
+	/*
+	 * Encode the TOCINFO with one descriptor plus one for every
+	 * four tracks.
+	 */
+	num_descriptors++;
+	num_descriptors += (cdtext->toc.last_track_number -
+			    cdtext->toc.first_track_number + 1) / 4;
+	if ((cdtext->toc.last_track_number -
+	     cdtext->toc.first_track_number + 1) % 4 > 0) {
+	    num_descriptors++;
+	}
+	block_descriptors[0]++;
+	block_descriptors[0] += (cdtext->toc.last_track_number -
+				 cdtext->toc.first_track_number + 1) / 4;
+	if ((cdtext->toc.last_track_number -
+	     cdtext->toc.first_track_number + 1) % 4 > 0) {
+	    block_descriptors[0]++;
+	}
+
 	/* Encode the TOCINFO2 with one descriptor per interval. */
 	for (track = cdtext->toc.first_track_number;
 	     track <= cdtext->toc.last_track_number;


enabled vDSP for iOS build

enabled vDSP for iOS build

--- OOps/fftlib.c
+++ OOps/fftlib.c
@@ -3370,7 +3370,7 @@
     sig[i] = buf[i]/s;
 }

-#if defined(__MACH__) // && !defined(IOS)
+#if defined(__MACH__)
 /* vDSP FFT implementation */
 #include <Accelerate/Accelerate.h>
 static
@@ -3421,7 +3421,7 @@
 int setupDispose(CSOUND *csound, void *pp){
   CSOUND_FFT_SETUP *setup =(CSOUND_FFT_SETUP *) pp;
   switch(setup->lib){
-#if defined(__MACH__) && !defined(IOS)
+#if defined(__MACH__)
   case VDSP_LIB:
     vDSP_destroy_fftsetupD(
 #ifdef USE_DOUBLE
@@ -3461,7 +3461,7 @@
   setup->N = FFTsize;
   setup->p2 = isPowTwo(FFTsize);
   switch(lib){
-#if defined(__MACH__) && !defined(IOS)
+#if defined(__MACH__)
   case VDSP_LIB:
     setup->M = ConvertFFTSize(csound, FFTsize);
     setup->setup = (void *)
@@ -3501,7 +3501,7 @@
   CSOUND_FFT_SETUP *setup =
         (CSOUND_FFT_SETUP *) p;
   switch(setup->lib) {
-#if defined(__MACH__) && !defined(IOS)
+#if defined(__MACH__)
   case VDSP_LIB:
     vDSP_execute(setup,sig);
     break;
@@ -3578,7 +3578,7 @@
   }
 }

-#if defined(__MACH__) && !defined(IOS)
+#if defined(__MACH__)
 void vDSP_DCT_execute(CSOUND *csound,
                      void *p, MYFLT *sig){
   CSOUND_FFT_SETUP *setup =
@@ -3680,7 +3680,7 @@
 CSOUND_FFT_SETUP *setup =
         (CSOUND_FFT_SETUP *) p;
   switch(setup->lib) {
-#if defined(__MACH__) && !defined(IOS)
+#if defined(__MACH__)
   case VDSP_LIB:
     vDSP_DCT_execute(csound,setup,sig);
     break;


domain_conf: cleanup virDomainGraphicsListensParseXML

Refactor the listen parser to use only one loop.

Signed-off-by: Pavel Hrdina <d4772d05997b8abf035041e3b4f4996380ea7e7a@redhat.com>

--- src/conf/domain_conf.c
+++ src/conf/domain_conf.c
@@ -10692,85 +10692,68 @@
                                  xmlXPathContextPtr ctxt,
                                  unsigned int flags)
 {
+    xmlNodePtr *listenNodes = NULL;
+    xmlNodePtr save = ctxt->node;
+    virDomainGraphicsListenDefPtr address = NULL;
+    char *listenAddr = NULL;
     int nListens;
-    xmlNodePtr *listenNodes = NULL;
-    char *listenAddr = NULL;
-    xmlNodePtr save = ctxt->node;
     int ret = -1;

     ctxt->node = node;
-    if (def->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC ||
-        def->type == VIR_DOMAIN_GRAPHICS_TYPE_RDP ||
-        def->type == VIR_DOMAIN_GRAPHICS_TYPE_SPICE) {
-
-        /* parse the <listen> subelements for graphics types that support it */
-        nListens = virXPathNodeSet("./listen", ctxt, &listenNodes);
-        if (nListens < 0)
-            goto error;
-
-        if (nListens > 0) {
-            size_t i;
-
-            if (VIR_ALLOC_N(def->listens, nListens) < 0)
+
+    if (def->type != VIR_DOMAIN_GRAPHICS_TYPE_VNC &&
+        def->type != VIR_DOMAIN_GRAPHICS_TYPE_RDP &&
+        def->type != VIR_DOMAIN_GRAPHICS_TYPE_SPICE) {
+        ret = 0;
+        goto error;
+    }
+
+    /* parse the <listen> subelements for graphics types that support it */
+    nListens = virXPathNodeSet("./listen", ctxt, &listenNodes);
+    if (nListens < 0)
+        goto error;
+
+    if (nListens > 0) {
+        size_t i;
+
+        if (VIR_ALLOC_N(def->listens, nListens) < 0)
+            goto error;
+
+        for (i = 0; i < nListens; i++) {
+            if (virDomainGraphicsListenDefParseXML(&def->listens[i],
+                                                   listenNodes[i],
+                                                   flags) < 0)
                 goto error;

-            for (i = 0; i < nListens; i++) {
-                int rv = virDomainGraphicsListenDefParseXML(&def->listens[i],
-                                                            listenNodes[i],
-                                                            flags);
-                if (rv < 0)
-                    goto error;
-                def->nListens++;
-            }
-            VIR_FREE(listenNodes);
-        }
-
-        /* listen attribute of <graphics> is also supported by these,
-         * but must match the 'address' attribute of the first listen
-         * that is type='address' (if present) */
-        listenAddr = virXMLPropString(node, "listen");
-        if (listenAddr && !listenAddr[0])
-            VIR_FREE(listenAddr);
-
-        if (listenAddr) {
-            if (def->nListens == 0) {
-                /* There were no <listen> elements, so we can just
-                 * directly set listenAddr as listens[0]->address */
-                if (virDomainGraphicsListenSetAddress(def, 0, listenAddr,
-                                                      -1, true) < 0)
-                    goto error;
-            } else {
-                /* There is at least 1 listen element, so we look for
-                 * the first listen of type='address', and make sure
-                 * its address matches the listen attribute from
-                 * graphics. */
-                bool matched = false;
-                const char *found = NULL;
-                size_t i;
-
-                for (i = 0; i < nListens; i++) {
-                    if (virDomainGraphicsListenGetType(def, i)
-                        == VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS) {
-                        found = virDomainGraphicsListenGetAddress(def, i);
-                        if (STREQ_NULLABLE(found, listenAddr))
-                            matched = true;
-                        break;
-                    }
-                }
-                if (found && !matched) {
-                    virReportError(VIR_ERR_XML_ERROR,
-                                   _("graphics listen attribute %s must match address "
-                                     "attribute of first listen element (found %s)"),
-                                   listenAddr, found);
-                    goto error;
-                } else if (!found) {
-                    /* quietly ignore listen address if none of the listens
-                     * are of type address */
-                    VIR_FREE(listenAddr);
-                }
-            }
-        }
-    }
+            if (!address &&
+                def->listens[i].type == VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_ADDRESS)
+                address = &def->listens[i];
+
+            def->nListens++;
+        }
+        VIR_FREE(listenNodes);
+    }
+
+    /* listen attribute of <graphics> is also supported by these,
+     * but must match the 'address' attribute of the first listen
+     * that is type='address' (if present) */
+    listenAddr = virXMLPropString(node, "listen");
+    if (STREQ_NULLABLE(listenAddr, ""))
+        VIR_FREE(listenAddr);
+
+    if (address && STRNEQ_NULLABLE(address->address, listenAddr)) {
+        virReportError(VIR_ERR_XML_ERROR,
+                       _("graphics listen attribute %s must match address "
+                         "attribute of first listen element (found %s)"),
+                       listenAddr, address->address);
+        goto error;
+    }
+
+    /* There were no <listen> elements, so we can just
+     * directly set listenAddr as listens[0]->address */
+    if (listenAddr && def->nListens == 0 &&
+        virDomainGraphicsListenSetAddress(def, 0, listenAddr, -1, true) < 0)
+        goto error;

     ret = 0;
  error:


Incorrect argument order to memset()

Incorrect argument order to memset()

--- crypto/engine/hw_4758_cca.c
+++ crypto/engine/hw_4758_cca.c
@@ -715,7 +715,7 @@

 	if (type == NID_sha1 || type == NID_md5)
 		{
-		memset(hashBuffer, keyLength+1, 0);
+		memset(hashBuffer, 0, keyLength+1);
 		OPENSSL_free(hashBuffer);
 		}

@@ -838,7 +838,7 @@

 	if (type == NID_sha1 || type == NID_md5)
 		{
-		memset(hashBuffer, keyLength+1, 0);
+		memset(hashBuffer, 0, keyLength+1);
 		OPENSSL_free(hashBuffer);
 		}


cally: Use AktObject::get_name()

cally: Use AktObject::get_name()

Instead of directly accessing the instance fields. This removes a
compiler warning after the constification of g_get_prgname(), and it
seems to me to be generally more correct.

--- clutter/cally/cally-root.c
+++ clutter/cally/cally-root.c
@@ -42,20 +42,21 @@
 static void cally_root_finalize   (GObject *object);

 /* AtkObject.h */
-static void       cally_root_initialize                            (AtkObject *accessible,
-                                                                    gpointer   data);
-static gint       cally_root_get_n_children                        (AtkObject *obj);
-static AtkObject *cally_root_ref_child                             (AtkObject *obj,
-                                                                    gint i);
-static AtkObject *cally_root_get_parent                            (AtkObject *obj);
+static void             cally_root_initialize           (AtkObject *accessible,
+                                                         gpointer   data);
+static gint             cally_root_get_n_children       (AtkObject *obj);
+static AtkObject *      cally_root_ref_child            (AtkObject *obj,
+                                                         gint i);
+static AtkObject *      cally_root_get_parent           (AtkObject *obj);
+static const char *     cally_root_get_name             (AtkObject *obj);

 /* Private */
-static void       cally_util_stage_added_cb                        (ClutterStageManager *stage_manager,
-                                                                    ClutterStage *stage,
-                                                                    gpointer data);
-static void       cally_util_stage_removed_cb                      (ClutterStageManager *stage_manager,
-                                                                    ClutterStage *stage,
-                                                                    gpointer data);
+static void             cally_util_stage_added_cb       (ClutterStageManager *stage_manager,
+                                                         ClutterStage *stage,
+                                                         gpointer data);
+static void             cally_util_stage_removed_cb     (ClutterStageManager *stage_manager,
+                                                         ClutterStage *stage,
+                                                         gpointer data);

 #define CALLY_ROOT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CALLY_TYPE_ROOT, CallyRootPrivate))

@@ -89,6 +90,7 @@
   class->ref_child = cally_root_ref_child;
   class->get_parent = cally_root_get_parent;
   class->initialize = cally_root_initialize;
+  class->get_name = cally_root_get_name;

   g_type_class_add_private (gobject_class, sizeof (CallyRootPrivate));
 }
@@ -167,7 +169,6 @@
   CallyRoot           *root          = NULL;

   accessible->role = ATK_ROLE_APPLICATION;
-  accessible->name = g_get_prgname();
   accessible->accessible_parent = NULL;

   /* children initialization */
@@ -238,6 +239,12 @@
   return NULL;
 }

+static const char *
+cally_root_get_name (AtkObject *obj)
+{
+  return g_get_prgname ();
+}
+
 /* -------------------------------- PRIVATE --------------------------------- */

 static void


Отключены флаги построения дерева

Отключены флаги построения дерева

--- libs/compiler/compiler.c
+++ libs/compiler/compiler.c
@@ -31,9 +31,9 @@
 #endif

-#define GENERATE_MACRO
-#define GENERATE_TABLES
-#define GENERATE_TREE
+//#define GENERATE_MACRO
+//#define GENERATE_TABLES
+//#define GENERATE_TREE

 const char *const DEFAULT_MACRO = "macro.txt";


modpost: Fix address calculation in reloc_location()

This patch fixes a segfault in modpost that is observed when the gold
linker is used to link the input objects.

The problem is that reloc_location (modpost.c) is computing the
address of the relocation target incorrectly. Here, elf->hdr points
to the beginning of the ELF file in memory, sechdr points to the
relocation section header, section is the index of the section
being relocated, and sechdrs[section].sh_offset would be the offset
of that section, relative to the beginning of the ELF file. Adding
elf->hdr + sechdrs[section].sh_offset gives you the address of the
beginning of the section, and adding r->r_offset to that gives you the
address of the location to be relocated. You do not need to subtract
sechdrs[section].sh_addr from that -- the result of this is an address
outside the file, and causes the segfault when addend_386_rel tries to
dereference it.

This bug is not observed when GNU ld is used to link the inputs. The
object file ubuntu/omnibook/omnibook.o is the result of an ld -r of
several other files.  When GNU ld does an ld -r, it sets the vaddr
field for each section to 0, but gold lays out the section addresses
sequentially instead:

Section Headers:
 [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
 [ 0]                   NULL            00000000 000000 000000 00      0   0  0
 [ 1] .text             PROGBITS        00000000 000034 004794 00  AX  0   0  4
 [ 2] .data             PROGBITS        0000b9d0 0047c8 0009c0 00  WA  0   0  4
 [ 3] .bss              NOBITS          000162f8 005188 00013c 00  WA  0   0  4
 [ 4] .rodata.str1.1    PROGBITS        00004f2d 0052c4 001b1a 01 AMS  0   0  1
 [ 5] .init.text        PROGBITS        00004794 006dde 0005fa 00  AX  0   0  1
 [ 6] .exit.text        PROGBITS        00004d8e 0073d8 00018a 00  AX  0   0  1
  ...

So the bug in the tool remained undiscovered because the section's vaddr
always happened to be 0.

Signed-off-by: Raymes Khoury <348ad72dc039a127ca70ef38e5de4eebe052b884@google.com>
Signed-off-by: Olof Johansson <8c69ee23f3f44f8162a64d579c1fa25c2f55298a@lixom.net>
Signed-off-by: Michal Marek <0c835876a532a476f30fdb1f6e963bae6c5a1a04@suse.cz>

--- scripts/mod/modpost.c
+++ scripts/mod/modpost.c
@@ -1442,7 +1442,7 @@
 	int section = shndx2secindex(sechdr->sh_info);

 	return (void *)elf->hdr + sechdrs[section].sh_offset +
-		r->r_offset - sechdrs[section].sh_addr;
+		r->r_offset;
 }

 static int addend_386_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)


Added board.c for Tiny2040

Added board.c for Tiny2040

error: pathspec 'ports/raspberrypi/boards/pimoroni_tiny2040/board.c' did not match any file(s) known to git

--- ports/raspberrypi/boards/pimoroni_tiny2040/board.c
+++ ports/raspberrypi/boards/pimoroni_tiny2040/board.c
@@ -0,0 +1,37 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "supervisor/board.h"
+
+void board_init(void) {
+}
+
+bool board_requests_safe_mode(void) {
+    return false;
+}
+
+void reset_board(void) {
+}


Create dont_elif.c

Create dont_elif.c

Тест работает

error: pathspec 'tests/errors/preprocessor/dont_elif.c' did not match any file(s) known to git

--- tests/errors/preprocessor/dont_elif.c
+++ tests/errors/preprocessor/dont_elif.c
@@ -0,0 +1,13 @@
+#define KEK 1
+
+int main ()
+{
+	#ifdef KEK
+		printf("0\n");
+	#elif KEK==1
+		printf("1\n");
+	#else
+		printf("10\n");
+
+	return 0;
+}


simple reordering

simple reordering

--- OOps/ugtabs.c
+++ OOps/ugtabs.c
@@ -78,22 +78,6 @@
   return OK;
 }

-int tablerkt_setup(CSOUND *csound, TABLER *p){
-
-   if (UNLIKELY(p->XINCODE != p->XOUTCODE)) {
-      if (csound->GetKsmps(csound) != 1)
-        return csound->InitError(csound, Str("tablekt: index type inconsistent with output"));
-    }
-  if (*p->mode)
-      p->mul = p->ftp->flen;
-    else
-      p->mul = 1;
-  p->len = p->ftp->flen;
-  p->iwrap = (int32) *p->wrap;
-  return OK;
-}
-
-
 int tabler_kontrol(CSOUND *csound, TABLER *p){
   int ndx, len = p->len;
   int mask = p->ftp->lenmask;
@@ -114,14 +98,7 @@
   return OK;
 }

-int tablerkt_kontrol(CSOUND *csound, TABLER *p){
-
-  if (UNLIKELY((p->ftp = csound->FTnp2Find(csound, p->ftable)) == NULL))
-      return csound->PerfError(csound, Str("table: could not find ftable %d"), (int) *p->ftable);
-   p->np2 = p->ftp->lenmask ? 0 : 1;
-
-  return tabler_kontrol(csound,p);
-}
+

 int tabler_audio(CSOUND *csound, TABLER *p){
   int ndx, len = p->len, n, nsmps = csound->GetKsmps(csound);
@@ -158,16 +135,6 @@
   return OK;
 }

-int tablerkt_audio(CSOUND *csound, TABLER *p){
-
-  if (UNLIKELY((p->ftp = csound->FTnp2Find(csound, p->ftable)) == NULL))
-      return csound->PerfError(csound, Str("table: could not find ftable %d"), (int) *p->ftable);
-   p->np2 = p->ftp->lenmask ? 0 : 1;
-
-  return tabler_audio(csound,p);;
-}
-
-
 int tableir_kontrol(CSOUND *csound, TABLER *p){
   int ndx, len = p->len;
   int mask = p->ftp->lenmask;
@@ -194,16 +161,6 @@
   *p->ans = x1 + (x2 - x1)*frac;
   return OK;
 }
-
-int tableirkt_kontrol(CSOUND *csound, TABLER *p){
-
-  if (UNLIKELY((p->ftp = csound->FTnp2Find(csound, p->ftable)) == NULL))
-      return csound->PerfError(csound, Str("table: could not find ftable %d"), (int) *p->ftable);
-   p->np2 = p->ftp->lenmask ? 0 : 1;
-
-  return tableir_kontrol(csound,p);;
-}
-

 int tableir_audio(CSOUND *csound, TABLER *p){
   int ndx, len = p->len, n, nsmps = csound->GetKsmps(csound);
@@ -243,15 +200,6 @@
   p->ans[n] = x1 + (x2 - x1)*frac;
 }
   return OK;
-}
-
-int tableirkt_audio(CSOUND *csound, TABLER *p){
-
-  if (UNLIKELY((p->ftp = csound->FTnp2Find(csound, p->ftable)) == NULL))
-      return csound->PerfError(csound, Str("table: could not find ftable %d"), (int) *p->ftable);
-   p->np2 = p->ftp->lenmask ? 0 : 1;
-
-  return tableir_audio(csound,p);;
 }

 int table3r_kontrol(CSOUND *csound, TABLER *p){
@@ -297,15 +245,6 @@
   return OK;
 }

-int table3rkt_kontrol(CSOUND *csound, TABLER *p){
-
-  if (UNLIKELY((p->ftp = csound->FTnp2Find(csound, p->ftable)) == NULL))
-      return csound->PerfError(csound, Str("table: could not find ftable %d"), (int) *p->ftable);
-   p->np2 = p->ftp->lenmask ? 0 : 1;
-
-  return table3r_kontrol(csound,p);;
-}
-
 int table3r_audio(CSOUND *csound, TABLER *p){
   int ndx, len = p->len, n, nsmps = csound->GetKsmps(csound);
   int mask = p->ftp->lenmask;
@@ -360,11 +299,72 @@
   return OK;
 }

+int tablerkt_setup(CSOUND *csound, TABLER *p){
+
+   if (UNLIKELY(p->XINCODE != p->XOUTCODE)) {
+      if (csound->GetKsmps(csound) != 1)
+        return csound->InitError(csound, Str("tablekt: index type inconsistent with output"));
+    }
+  if (*p->mode)
+      p->mul = p->ftp->flen;
+    else
+      p->mul = 1;
+  p->len = p->ftp->flen;
+  p->iwrap = (int32) *p->wrap;
+  return OK;
+}
+
+int tablerkt_kontrol(CSOUND *csound, TABLER *p){
+
+  if (UNLIKELY((p->ftp = csound->FTnp2Find(csound, p->ftable)) == NULL))
+      return csound->PerfError(csound, Str("table: could not find ftable %d"), (int) *p->ftable);
+   p->np2 = p->ftp->lenmask ? 0 : 1;
+
+  return tabler_kontrol(csound,p);
+}
+
+
+int tablerkt_audio(CSOUND *csound, TABLER *p){
+
+  if (UNLIKELY((p->ftp = csound->FTnp2Find(csound, p->ftable)) == NULL))
+      return csound->PerfError(csound, Str("table: could not find ftable %d"), (int) *p->ftable);
+   p->np2 = p->ftp->lenmask ? 0 : 1;
+
+  return tabler_audio(csound,p);;
+}
+
+int tableirkt_kontrol(CSOUND *csound, TABLER *p){
+
+  if (UNLIKELY((p->ftp = csound->FTnp2Find(csound, p->ftable)) == NULL))
+      return csound->PerfError(csound, Str("table: could not find ftable %d"), (int) *p->ftable);
+   p->np2 = p->ftp->lenmask ? 0 : 1;
+
+  return tableir_kontrol(csound,p);;
+}
+
+int tableirkt_audio(CSOUND *csound, TABLER *p){
+
+  if (UNLIKELY((p->ftp = csound->FTnp2Find(csound, p->ftable)) == NULL))
+      return csound->PerfError(csound, Str("table: could not find ftable %d"), (int) *p->ftable);
+   p->np2 = p->ftp->lenmask ? 0 : 1;
+
+  return tableir_audio(csound,p);;
+}
+
+int table3rkt_kontrol(CSOUND *csound, TABLER *p){
+
+  if (UNLIKELY((p->ftp = csound->FTnp2Find(csound, p->ftable)) == NULL))
+      return csound->PerfError(csound, Str("table: could not find ftable %d"), (int) *p->ftable);
+   p->np2 = p->ftp->lenmask ? 0 : 1;
+
+  return table3r_kontrol(csound,p);;
+}
+
 int table3rkt_audio(CSOUND *csound, TABLER *p){

   if (UNLIKELY((p->ftp = csound->FTnp2Find(csound, p->ftable)) == NULL))
       return csound->PerfError(csound, Str("table: could not find ftable %d"), (int) *p->ftable);
    p->np2 = p->ftp->lenmask ? 0 : 1;

-  return table3r_audio(csound,p);;
-}
+  return table3r_audio(csound,p);
+}


increase MAXLINE to 8192

increase MAXLINE to 8192

i ran into issues in reading long lines from het.  and as far as i see, this would coincide with the limit in fprints as set in fout.c, line 1284.

--- Opcodes/date.c
+++ Opcodes/date.c
@@ -133,7 +133,7 @@
 }

 #ifndef MAXLINE
-#define MAXLINE 1024
+#define MAXLINE 8192
 #endif

 typedef struct {